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

OSC.hasStaticInitializer should not swallow ExceptionInInitializerErrors

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • 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).

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: