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

UTF8ZipCoder not thread-safe since JDK-8243469

    XMLWordPrintable

    Details

    • Subcomponent:
    • Introduced In Version:
      15
    • Resolved In Build:
      b07

      Backports

        Description

        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.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                redestad Claes Redestad
                Reporter:
                redestad Claes Redestad
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: