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>
stable-4.3
Ivan Motsch 9 years ago
parent
commit
2baa5f1d6d
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java

2
org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java

@ -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