Skip to content

Commit 25a3704

Browse files
author
Balaji Ramalingam
committed
use the method removeExtension from FileNameUtils
1 parent fa5b4bd commit 25a3704

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

components/insight/SRC/org/openmicroscopy/shoola/env/init/ContainerConfigInit.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,15 @@
2525

2626
//Java imports
2727
import ij.IJ;
28+
2829
import java.io.File;
2930
import java.util.Iterator;
3031
import java.util.List;
3132

3233
//Third-party libraries
3334

35+
36+
import org.apache.commons.io.FilenameUtils;
3437
//Application-internal dependencies
3538
import org.openmicroscopy.shoola.env.Container;
3639
import org.openmicroscopy.shoola.env.LookupNames;
@@ -93,11 +96,8 @@ private boolean handlePluginDependencies(PluginInfo info)
9396
value = values[j];
9497
if (value != null) value = value.trim();
9598
if (l == null) continue;
96-
int idx = value.indexOf(".jar");
97-
if (idx==-1){
98-
idx = value.length();
99-
}
100-
value = value.substring(0, idx);
99+
value = FilenameUtils.removeExtension(value);
100+
101101
for (int i = 0; i < l.length; i++) {
102102
if (l[i].getName().startsWith(value)) {
103103
count++;

0 commit comments

Comments
 (0)