We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ec0818a commit 50e903bCopy full SHA for 50e903b
jdk/src/solaris/classes/sun/nio/fs/UnixUriUtils.java
@@ -74,10 +74,6 @@ static Path fromUri(UnixFileSystem fs, URI uri) {
74
int pos = 0;
75
while (pos < len) {
76
char c = p.charAt(pos++);
77
- if ((c == '/') && (pos < len) && (p.charAt(pos) == '/')) {
78
- // skip redundant slashes
79
- continue;
80
- }
81
byte b;
82
if (c == '%') {
83
assert (pos+2) <= len;
@@ -91,6 +87,10 @@ static Path fromUri(UnixFileSystem fs, URI uri) {
91
87
throw new IllegalArgumentException("Bad escape");
92
88
b = (byte)c;
93
89
}
90
+ if (b == '/' && rlen > 0 && result[rlen-1] == '/') {
+ // skip redundant slashes
+ continue;
+ }
94
result[rlen++] = b;
95
96
if (rlen != result.length)
0 commit comments