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

Missing doPrivileged() in sun.text.NormalizerImpl

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 5.0
    • 5.0
    • core-libs
    • None
    • tiger
    • generic, x86, sparc
    • generic, solaris_8, solaris_9, windows_2003
    • Verified

      After bringing over the changes from the b16 I18N integration, two regression tests in the security suite fail (sun/security/x509/AVA/AVAEqualsHashCode.java, sun/security/provider/PolicyFile/SelfExpansion.java) with an error like:

      Exception in thread "main" java.lang.ExceptionInInitializerError
              at sun.text.Normalizer.decompose(Normalizer.java:673)
              at sun.text.Normalizer$NFKDMode.normalize(Normalizer.java:325)
              at sun.text.Normalizer.normalize(Normalizer.java:735)
              at sun.security.x509.AVA.toRFC2253CanonicalString(AVA.java:923)
              at sun.security.x509.AVA.equals(AVA.java:574)
              at AVAEqualsHashCode.main(AVAEqualsHashCode.java:48)
      Caused by: java.lang.RuntimeException: Stream closed
              at sun.text.NormalizerImpl.<clinit>(NormalizerImpl.java:44)
              ... 6 more

      The cause is line 215 from NormalizerImpl:

          InputStream i = getClass().getResourceAsStream(DATA_FILE_NAME);

      which fails to retrieve the resource if a security manager is installed. It should probably be enclosed by a doPrivileged() block.

            sherman Xueming Shen
            andreas Andreas Sterbenz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: