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

LineBrokenMultiByteCharacter.java fails on some systems that does not accept a non-ASCII char in Path

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: security-libs
    • Labels:

      Description

      The test calls JarUtils::updateJar to add an entry with a non-ASCII name into a JarFile. This method first checks if such a file exists. If yes, adds that file, and if no, creates a new entry. Unfortunately creating a Path with the name fails on some systems.

      Below is an example on a Linux 3.8.13-118.13.3.el7uek.x86_64 (amd64).

      java.nio.file.InvalidPathException: Malformed input or input contains unmappable characters: LineBrokenMultiByteCharacterA1234567890B1234567890C123456789D12?xyz.class
      at java.base/sun.nio.fs.UnixPath.encode(UnixPath.java:145)
      at java.base/sun.nio.fs.UnixPath.<init>(UnixPath.java:69)
      at java.base/sun.nio.fs.UnixFileSystem.getPath(UnixFileSystem.java:280)
      at java.base/java.nio.file.Paths.get(Paths.java:84)
      at jdk.test.lib.util.JarUtils.updateJar(JarUtils.java:91)
      at LineBrokenMultiByteCharacter.testSignJarUpdate(LineBrokenMultiByteCharacter.java:104)
      at LineBrokenMultiByteCharacter.main(LineBrokenMultiByteCharacter.java:75)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      at com.sun.javatest.regtest.agent.MainActionHelper$SameVMRunnable.run(MainActionHelper.java:230)
      at java.base/java.lang.Thread.run(Thread.java:844)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                weijun Weijun Wang
                Reporter:
                weijun Weijun Wang
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: