Skip to content

Commit 3d2aec6

Browse files
committed
EclipseHelper: use a different tell-tale than ':' for jar: URLs
When running the EclipseHelper to index annotations on directories, we used to look for colons in the path to determine whether it might not be a plain file. This interferes with those pesky DOS-style paths that Windows still retains, though. So just switch to look for a leading slash (which is used in URLs even on Windows). Pointed out by Jamion Jenkins. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 62a771e commit 3d2aec6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/main/java/org/scijava/annotations/EclipseHelper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ private void maybeIndex(final URL url, final ClassLoader loader) {
134134
return;
135135
}
136136
String path = url.getFile();
137-
if (path.indexOf(':') >= 0) {
137+
if (!path.startsWith("/")) {
138138
return;
139139
}
140140
if (path.endsWith(".jar")) {

0 commit comments

Comments
 (0)