|
|
@ -232,7 +232,7 @@ public class PathPattern implements Comparable<PathPattern> { |
|
|
|
while (separatorCount > 0 && pos < len) { |
|
|
|
while (separatorCount > 0 && pos < len) { |
|
|
|
if (path.charAt(pos++) == separator) { |
|
|
|
if (path.charAt(pos++) == separator) { |
|
|
|
// Skip any adjacent separators
|
|
|
|
// Skip any adjacent separators
|
|
|
|
while (path.charAt(pos) == separator) { |
|
|
|
while (pos < len && path.charAt(pos) == separator) { |
|
|
|
pos++; |
|
|
|
pos++; |
|
|
|
} |
|
|
|
} |
|
|
|
separatorCount--; |
|
|
|
separatorCount--; |
|
|
@ -240,7 +240,7 @@ public class PathPattern implements Comparable<PathPattern> { |
|
|
|
} |
|
|
|
} |
|
|
|
int end = len; |
|
|
|
int end = len; |
|
|
|
// Trim trailing separators
|
|
|
|
// Trim trailing separators
|
|
|
|
while (path.charAt(end - 1) == separator) { |
|
|
|
while (end > 0 && path.charAt(end - 1) == separator) { |
|
|
|
end--; |
|
|
|
end--; |
|
|
|
} |
|
|
|
} |
|
|
|
// Check if multiple separators embedded in the resulting path, if so trim them out.
|
|
|
|
// Check if multiple separators embedded in the resulting path, if so trim them out.
|
|
|
|