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

Incorrect initialization order of static fields in sun.nio.cs.ext.JISAutoDetect$Decoder

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-libs
    • Resolved In Build:
      b08

      Description

      TESTFAIL:sun/nio/cs/CheckHistoricalNames.java
      TESTFAIL:sun/nio/cs/FindDecoderBugs.java
      TESTFAIL:sun/nio/cs/JISAutoDetectTest.java
      TESTFAIL:sun/nio/cs/NIOJISAutoDetectTest.java
      TESTFAIL:java/nio/charset/Charset/NIOCharsetAvailabilityTest.java

      sun/nio/cs/CheckHistoricalNames.java
      sun/nio/cs/FindDecoderBugs.java
      sun/nio/cs/JISAutoDetectTest.java
      sun/nio/cs/NIOJISAutoDetectTest.java

      Start failing since JDK-8038177, with error:
      java.lang.NoClassDefFoundError: Could not initialize class sun.nio.cs.ext.JISAutoDetect$Decoder
      at sun.nio.cs.ext.JISAutoDetect.newDecoder(JISAutoDetect.java:69)
      at FindDecoderBugs$CharsetTester.recode(FindDecoderBugs.java:201)
      at FindDecoderBugs$CharsetTester.recode2(FindDecoderBugs.java:252)
      at FindDecoderBugs$CharsetTester.test(FindDecoderBugs.java:264)
      at FindDecoderBugs$CharsetTester.testPrefix(FindDecoderBugs.java:312)
      at FindDecoderBugs.testCharset(FindDecoderBugs.java:395)
      at FindDecoderBugs.realMain(FindDecoderBugs.java:416)
      at FindDecoderBugs.main(FindDecoderBugs.java:442)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:754)
      at java.lang.Thread.run(Thread.java:744)

      java/nio/charset/Charset/NIOCharsetAvailabilityTest.java

      Also failed due to JDK-8038177 changes:
      java.lang.ExceptionInInitializerError
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:259)
      at NIOCharsetAvailabilityTest.addCharsets(NIOCharsetAvailabilityTest.java:136)
      at NIOCharsetAvailabilityTest.main(NIOCharsetAvailabilityTest.java:56)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:754)
      at java.lang.Thread.run(Thread.java:744)
      Caused by: java.lang.NullPointerException
      at sun.nio.cs.ext.JISAutoDetect$Decoder.getSJISName(JISAutoDetect.java:249)
      at sun.nio.cs.ext.JISAutoDetect$Decoder.<clinit>(JISAutoDetect.java:121)
      ... 10 more

        Attachments

          Activity

            People

            Assignee:
            mchung Mandy Chung
            Reporter:
            amlu Amy Lu (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: