OSC.hasStaticInitializer should not swallow ExceptionInInitializerErrors

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: core-libs
    • None
    • beta2
    • generic
    • generic
    • Verified

      The current implementation of ObjectStreamClass.hasStaticInitializer()
      returns false if the JNI call to GetStaticMethodID results in any
      exception. This can result in bogus serialVersionUID values for classes
      whose static initializers throw exceptions. hasStaticInitializer() should
      be modified to return false only if the raised exception is a NoSuchMethodError;
      otherwise, it should *not* clear the exception (which should be either an
      ExceptionInInitializerError or OutOfMemoryError).

            Assignee:
            Michael Warres (Inactive)
            Reporter:
            Michael Warres (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: