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

UTF8ZipCoder not thread-safe since JDK-8243469

XMLWordPrintable

    • 15
    • b07
    • Verified

        Vitaly Davidovich reports an IllegalStateException when inspecting a JarFile's contents using a parallel stream:

        java.lang.IllegalStateException: Current state = CODING_END, new state = FLUSHED
                       at
        java.base/java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:998)
                       at
        java.base/java.nio.charset.CharsetDecoder.flush(CharsetDecoder.java:681)
                       at
        java.base/java.nio.charset.CharsetDecoder.decode(CharsetDecoder.java:810)
                       at
        java.base/java.util.zip.ZipCoder.normalizedHashDecode(ZipCoder.java:136)

        This is due JDK-8243469 which changed the UTF-8 ZipCoder code to use a shared CharsetDecoder, which is not legal.

              redestad Claes Redestad
              redestad Claes Redestad
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: