JDK-8177640 : jdk/internal/util/jar/TestVersionedStream.java fails on Windows
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2017-03-27
  • Updated: 2024-06-11
  • Resolved: 2017-04-06
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 10 JDK 9
10Fixed 9 b165Fixed
Related Reports
Relates :  
Description
jdk/internal/util/jar/TestVersionedStream.java fails on Windows (since test introduced):

STDERR:
org.testng.TestNGException:
Cannot instantiate class TestVersionedStream
...

Caused by: java.lang.IllegalArgumentException: Illegal character in path at index 10:
...
    at java.base/java.net.URI.create(URI.java:873)
    at TestVersionedStream.lambda$createFiles$6(TestVersionedStream.java:212)
...
    at TestVersionedStream.createFiles(TestVersionedStream.java:215)
    at TestVersionedStream.<init>(TestVersionedStream.java:75)
    ... 27 more
Caused by: java.net.URISyntaxException: Illegal character in path at index 10: 
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/383a04a71b36 User: lana Date: 2017-04-12 18:47:13 +0000
12-04-2017

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/383a04a71b36 User: amlu Date: 2017-04-06 01:34:45 +0000
06-04-2017

RFR: http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-April/047059.html
05-04-2017

Test fails at preparation step: 208: private void createFiles(String... files) { 209: ArrayList<String> list = new ArrayList(); 210: Arrays.stream(files) 211: .map(f -> "file:///" + userdir + "/" + f) ——>>>> This results something like: ——>>>> file:///C:\jprt\blabla\jdk\testoutput\jdk_util\JTwork\scratch/base/p/Bar.class 212: .map(f -> URI.create(f)) ——>>>> And this cause java.net.URISyntaxException: Illegal character in path at index 10: 213: .filter(u -> u != null) 214: .map(u -> Paths.get(u)) 215: .forEach(p -> { 216: try { 217: Files.createDirectories(p.getParent()); Test tries to get a list of Path (for line 215), could just use Paths.get(String first, String... more).
27-03-2017