Unsafe throws IAE for misusing static vs instance fields, and it's revealed 
that AtomicXxxFieldUpdaters are using this mechanism to reject static fields. 
This is not a good practice, but we can at least document this so we don't 
accidentally introduce problems.

-------------

Commit messages:
 - Simplify
 - Add static check
 - Document IAE for Unsafe offset methods

Changes: https://git.openjdk.org/jdk/pull/25945/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25945&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8361300
  Stats: 25 lines in 5 files changed: 16 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/jdk/pull/25945.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25945/head:pull/25945

PR: https://git.openjdk.org/jdk/pull/25945

Reply via email to