Revision: 19638 http://sourceforge.net/p/gate/code/19638 Author: markagreenwood Date: 2016-10-05 18:21:30 +0000 (Wed, 05 Oct 2016) Log Message: ----------- helps if you update code that also uses the api before testing
Modified Paths: -------------- gate/branches/sawdust2/Test-Utils/src/main/java/gate/test/GATEPluginTestCase.java gate/branches/sawdust2/gate-maven-plugin/src/main/java/uk/ac/gate/maven/DumpCreoleToXML.java Modified: gate/branches/sawdust2/Test-Utils/src/main/java/gate/test/GATEPluginTestCase.java =================================================================== --- gate/branches/sawdust2/Test-Utils/src/main/java/gate/test/GATEPluginTestCase.java 2016-10-05 17:39:07 UTC (rev 19637) +++ gate/branches/sawdust2/Test-Utils/src/main/java/gate/test/GATEPluginTestCase.java 2016-10-05 18:21:30 UTC (rev 19638) @@ -24,6 +24,7 @@ import java.io.FileInputStream; import java.io.IOException; import java.net.MalformedURLException; +import java.net.URISyntaxException; import java.net.URL; import java.util.HashSet; import java.util.Properties; @@ -69,7 +70,12 @@ String version) throws MalformedURLException { super(group, artifact, version); this.creoleFile = creoleFile; - this.baseURL = new URL(creoleFile.toURI().toURL(), "."); + try { + this.baseURL = (new URL(creoleFile.toURI().toURL(), ".")).toURI(); + } catch(URISyntaxException e) { + //this should be impossible + throw new RuntimeException(e); + } } @Override @@ -77,7 +83,7 @@ SAXBuilder builder = new SAXBuilder(false); Document jdomDoc = builder.build(new FileInputStream(creoleFile), - baseURL.toExternalForm()); + getBaseURL().toExternalForm()); Element creoleRoot = jdomDoc.getRootElement(); Modified: gate/branches/sawdust2/gate-maven-plugin/src/main/java/uk/ac/gate/maven/DumpCreoleToXML.java =================================================================== --- gate/branches/sawdust2/gate-maven-plugin/src/main/java/uk/ac/gate/maven/DumpCreoleToXML.java 2016-10-05 17:39:07 UTC (rev 19637) +++ gate/branches/sawdust2/gate-maven-plugin/src/main/java/uk/ac/gate/maven/DumpCreoleToXML.java 2016-10-05 18:21:30 UTC (rev 19638) @@ -148,7 +148,7 @@ throws MalformedURLException { super(group, artifact, version); - this.baseURL = dir.toURI().toURL(); + this.baseURL = dir.toURI(); this.creoleFile = new File(dir, "creole.xml"); } @@ -157,7 +157,7 @@ // load the existing creole.xml file into memory SAXBuilder builder = new SAXBuilder(false); Document jdomDoc = builder.build(new FileInputStream(creoleFile), - baseURL.toExternalForm()); + getBaseURL().toExternalForm()); Element creoleRoot = jdomDoc.getRootElement(); // add a comment to make it clear the expanded version is just for info This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, SlashDot.org! http://sdm.link/slashdot _______________________________________________ GATE-cvs mailing list GATE-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gate-cvs