8000 make substring args less confusing · imagej/example-legacy-plugin@10cfab2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 10cfab2

Browse files
committed
make substring args less confusing
update Process_Pixels so the substring arguments less confusing. This is really based on my personal point of view.
1 parent 7405f20 commit 10cfab2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/Process_Pixels.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ public static void main(String[] args) {
176176
// set the plugins.dir property to make the plugin appear in the Plugins menu
177177
Class<?> clazz = Process_Pixels.class;
178178
String url = clazz.getResource("/" + clazz.getName().replace('.', '/') + ".class").toString();
179-
String pluginsDir = url.substring(5, url.length() - clazz.getName().length() - 6);
179+
String pluginsDir = url.substring("file:".length(), url.length() - clazz.getName().length() - ".class".length());
180180
System.setProperty("plugins.dir", pluginsDir);
181181

182182
// start ImageJ

0 commit comments

Comments
 (0)
0