Skip to content

Commit 2ea8bda

Browse files
author
Gabriel Einsdorf
committed
URLUtil Code cleanup
1 parent f9cc77a commit 2ea8bda

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • org.knime.knip.io/src/org/knime/knip/io/nodes/imgreader2

org.knime.knip.io/src/org/knime/knip/io/nodes/imgreader2/URLUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ public static URI encode(String in) {
2323
} catch (MalformedURLException | URISyntaxException e1) {
2424
try {
2525
final URI fromString = URIUtil.fromString(in);
26+
// no scheme specified, we assume 'file://'
2627
if (fromString.getScheme() == null) {
2728
final String fragment = fromString.getFragment();
2829
if (fragment != null) {
2930
return new URI("file", fromString.getSchemeSpecificPart() + "#" + fragment, null);
30-
} else {
31-
return new URI("file", fromString.getSchemeSpecificPart(), fragment);
3231
}
32+
return new URI("file", fromString.getSchemeSpecificPart(), fragment);
3333
} else if (isValidScheme(fromString.getScheme())) {
3434
return fromString;
3535
} else {

0 commit comments

Comments
 (0)