Document exceptions for Unsafe offset methods

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 26
    • Affects Version/s: None
    • Component/s: core-libs
    • None
    • b11

      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.

            Assignee:
            Chen Liang
            Reporter:
            Chen Liang
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: