Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public static String fixUriPath(final String uriPath) {
public static String toURI(final String uriPath) {
for (int i = 0; i < PATH_TO_URL_MATCH.length; i++) {
final Matcher m = PATH_TO_URL_MATCH[i].matcher(uriPath);
if (m.find()) {
if (m.matches()) {
return m.replaceAll(PATH_TO_URL_REPLACEMENT[i]);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,11 @@

public class MapEntryTest {

@Test public void test_regular_path() {
// regular paths should return null like the Javadoc says
assertNull(MapEntry.toURI("/the/path"));
}

@Test public void test_to_url_http_80() {
assertEqualUri("http://sling.apache.org", "http/sling.apache.org.80");
assertEqualUri("http://sling.apache.org/", "http/sling.apache.org.80/");
Expand Down