Browse Source

Tests on Windows with URIish fail

The reason is that URIish(URL) and URIish(String) make different parsing
of path / rawPath with regard to drive letters. /C:/... for URL and
C:/... for String. This patch fixes the issue.

Change-Id: I8e2013fff30b7bb198ff733c038e21366667b8a0
Signed-off-by: Ivan Motsch <ivan.motsch@bsiag.com>
tags/v4.3.0.201603230630-rc1
Ivan Motsch 8 years ago
parent
commit
2baa5f1d6d
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java

+ 2
- 0
org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java View File

@@ -376,8 +376,10 @@ public class URIish implements Serializable {
public URIish(final URL u) {
scheme = u.getProtocol();
path = u.getPath();
path = cleanLeadingSlashes(path, scheme);
try {
rawPath = u.toURI().getRawPath();
rawPath = cleanLeadingSlashes(rawPath, scheme);
} catch (URISyntaxException e) {
throw new RuntimeException(e); // Impossible
}

Loading…
Cancel
Save