Loading plugins/org.etsi.mts.tdl.constraints/src/org/etsi/mts/tdl/constraints/evl/Validator.java +0 −4 Original line number Diff line number Diff line Loading @@ -278,7 +278,6 @@ public class Validator { URI uri = null; URL location = this.getClass().getProtectionDomain().getCodeSource().getLocation(); String codeLocation = location.toString(); System.out.println("Location: "+codeLocation); try{ if (codeLocation.endsWith(".jar")) { //Call from jar Loading @@ -286,13 +285,10 @@ public class Validator { //should get file out of jar / bundle instead //TODO: simplify and merge with above, test other cases //TODO: generalise for use in other cases, e.g. for docx and others? System.out.println("In jar"); try { Enumeration<URL> resources = ClassLoader.getSystemResources(relativePath.replaceAll("epsilon/", "")); URL nextElement = resources.nextElement(); System.out.println("URL: "+nextElement); uri = nextElement.toURI(); System.out.println("URI: "+uri); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); Loading Loading
plugins/org.etsi.mts.tdl.constraints/src/org/etsi/mts/tdl/constraints/evl/Validator.java +0 −4 Original line number Diff line number Diff line Loading @@ -278,7 +278,6 @@ public class Validator { URI uri = null; URL location = this.getClass().getProtectionDomain().getCodeSource().getLocation(); String codeLocation = location.toString(); System.out.println("Location: "+codeLocation); try{ if (codeLocation.endsWith(".jar")) { //Call from jar Loading @@ -286,13 +285,10 @@ public class Validator { //should get file out of jar / bundle instead //TODO: simplify and merge with above, test other cases //TODO: generalise for use in other cases, e.g. for docx and others? System.out.println("In jar"); try { Enumeration<URL> resources = ClassLoader.getSystemResources(relativePath.replaceAll("epsilon/", "")); URL nextElement = resources.nextElement(); System.out.println("URL: "+nextElement); uri = nextElement.toURI(); System.out.println("URI: "+uri); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); Loading