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

jdk/nio/zipfs/ZipFSTester.java fails if file path contains '+' character

    XMLWordPrintable

Details

    • b16

    Backports

      Description

        Filed on behalf of Sun Xu (sunxu01@loongson.cn).

        The ZipFSTester.java generates the basic.jar for testing.
        However, if the path has plus character, the following string will be delivered to the newZipFileSystem method:

        jdk-ls+18/build/linux-loongarch64-server-release/test-support/jtreg_test_jdk_jdk_nio_zipfs_ZipFSTester_java/scratch/0/basic.jar

        After processing via URLDecoder.decode within newZipFileSystem, the "+" is replaced by " ":

        jdk-ls 18/build/linux-loongarch64-server-release/test-support/jtreg_test_jdk_jdk_nio_zipfs_ZipFSTester_java/scratch/0/basic.jar

        Then, the FileSystems.newFileSystem method will raise java.nio.file.NoSuchFileException for the inexistent "jdk-ls 18" path.

        TEST RESULT: Failed. Execution failed: `main' threw exception: java.nio.file.NoSuchFileException: jdk-ls 18/build/linux-loongarch64-server-release/test-support/jtreg_test_jdk_jdk_nio_zipfs_ZipFSTester_java/scratch/0/basic.jar

        Attachments

          Issue Links

            Activity

              People

                lancea Lance Andersen
                aoqi Qi Ao
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: