bugs fixed
diff --git a/org.eclipse.emf.refactor.metrics.generator/src/org/eclipse/emf/refactor/metrics/generator/ui/MetricBasicDataWizardPage.java b/org.eclipse.emf.refactor.metrics.generator/src/org/eclipse/emf/refactor/metrics/generator/ui/MetricBasicDataWizardPage.java
index 206f25a..88a3fa0 100644
--- a/org.eclipse.emf.refactor.metrics.generator/src/org/eclipse/emf/refactor/metrics/generator/ui/MetricBasicDataWizardPage.java
+++ b/org.eclipse.emf.refactor.metrics.generator/src/org/eclipse/emf/refactor/metrics/generator/ui/MetricBasicDataWizardPage.java
@@ -100,7 +100,11 @@
.getCodeSource().getLocation().toURI());
String jarName = jarFile.getName();
int index = jarName.indexOf("_");
- jar = jarName.substring(0, index);
+ if (index == -1) {
+ jar = jarName;
+ } else {
+ jar = jarName.substring(0, index);
+ }
System.out.println("Jar5: " + jar);
} catch (URISyntaxException e) {
e.printStackTrace();
@@ -255,7 +259,11 @@
.getCodeSource().getLocation().toURI());
String jarName = jarFile.getName();
int index = jarName.indexOf("_");
- jar = jarName.substring(0, index);
+ if (index == -1) {
+ jar = jarName;
+ } else {
+ jar = jarName.substring(0, index);
+ }
System.out.println("Jar5: " + jar);
} catch (URISyntaxException e) {
e.printStackTrace();