aboutsummaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
index c9bb89a436..7b5842b712 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/transport/URIish.java
@@ -82,7 +82,7 @@ public class URIish implements Serializable {
* Part of a pattern which matches a relative path. Relative paths don't
* start with slash or drive letters. Defines no capturing group.
*/
- private static final String RELATIVE_PATH_P = "(?:(?:[^\\\\/]+[\\\\/]+)*[^\\\\/]+[\\\\/]*)"; //$NON-NLS-1$
+ private static final String RELATIVE_PATH_P = "(?:(?:[^\\\\/]+[\\\\/]+)*+[^\\\\/]*)"; //$NON-NLS-1$
/**
* Part of a pattern which matches a relative or absolute path. Defines no
@@ -94,7 +94,7 @@ public class URIish implements Serializable {
private static final long serialVersionUID = 1L;
/**
- * A pattern matching standard URI: </br>
+ * A pattern matching standard URI: <br>
* <code>scheme "://" user_password? hostname? portnumber? path</code>
*/
private static final Pattern FULL_URI = Pattern.compile("^" // //$NON-NLS-1$
@@ -120,7 +120,7 @@ public class URIish implements Serializable {
* path (maybe even containing windows drive-letters) or a relative path.
*/
private static final Pattern LOCAL_FILE = Pattern.compile("^" // //$NON-NLS-1$
- + "([\\\\/]?" + PATH_P + ")" // //$NON-NLS-1$ //$NON-NLS-2$
+ + "([\\\\/]?+" + PATH_P + ")" // //$NON-NLS-1$ //$NON-NLS-2$
+ "$"); //$NON-NLS-1$
/**
@@ -175,6 +175,7 @@ public class URIish implements Serializable {
* @param s
* a {@link java.lang.String} object.
* @throws java.net.URISyntaxException
+ * if {@code s} was null or couldn't be parsed
*/
public URIish(String s) throws URISyntaxException {
if (StringUtils.isEmptyOrNull(s)) {
@@ -477,6 +478,7 @@ public class URIish implements Serializable {
* the new value for path.
* @return a new URI with the updated value.
* @throws java.net.URISyntaxException
+ * if URI couldn't be parsed from String
*/
public URIish setRawPath(String n) throws URISyntaxException {
final URIish r = new URIish(this);
@@ -551,7 +553,6 @@ public class URIish implements Serializable {
return r;
}
- /** {@inheritDoc} */
@Override
public int hashCode() {
int hc = 0;
@@ -570,7 +571,6 @@ public class URIish implements Serializable {
return hc;
}
- /** {@inheritDoc} */
@Override
public boolean equals(Object obj) {
if (!(obj instanceof URIish))
@@ -611,7 +611,6 @@ public class URIish implements Serializable {
return format(true, false);
}
- /** {@inheritDoc} */
@Override
public String toString() {
return format(false, false);
@@ -683,7 +682,8 @@ public class URIish implements Serializable {
/**
* Get the "humanish" part of the path. Some examples of a 'humanish' part
* for a full path:
- * <table summary="path vs humanish path" border="1">
+ * <table border="1">
+ * <caption>path vs. humanish path</caption>
* <tr>
* <th>Path</th>
* <th>Humanish part</th>