Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8361300

Document exceptions for Unsafe offset methods

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • 26
    • None
    • core-libs
    • None
    • In Review

      Some unsafe methods, like objectFieldOffset0 and staticFieldBase0, throw unspecified IAE that has been relied on by Platform APIs like AtomicIntegerFieldUpdater. We should note these in Unsafe.

      objectFieldOffset1 does not properly filter static fields; this patch trivially adds that.

      staticFieldBase and staticFieldOffset currently throw NoClassDefFoundError when it tries to throw a java/lang/InvalidClassException (there's one in java.io). Since they are exposed in sun.misc.Unsafe, we will preserve this behavior for now.

            liach Chen Liang
            liach Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: