diff --git a/.travis.yml b/.travis.yml index bb9bf510b1..6746592975 100644 --- a/.travis.yml +++ b/.travis.yml @@ -43,4 +43,4 @@ jobs: # Add email to link commits to user - git config user.email "${GIT_EMAIL}" # Skip building of release commits - - mvn --batch-mode -q -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests release:clean release:prepare release:perform \ No newline at end of file + - mvn --batch-mode -q -DscmCommentPrefix="[maven-release-plugin][skip ci] " -Dusername="${GIT_USERNAME}" -Dpassword="${GIT_PASSWORD}" -DskipTests -Darguments=-DskipTests release:clean release:prepare release:perform diff --git a/src/main/java/org/alfresco/util/ConfigFileFinder.java b/src/main/java/org/alfresco/util/ConfigFileFinder.java index 5b89a3a375..f097bb743a 100644 --- a/src/main/java/org/alfresco/util/ConfigFileFinder.java +++ b/src/main/java/org/alfresco/util/ConfigFileFinder.java @@ -37,6 +37,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; import java.io.Reader; +import java.net.URISyntaxException; import java.net.URL; import java.util.ArrayList; import java.util.Arrays; @@ -81,7 +82,7 @@ public abstract class ConfigFileFinder AtomicBoolean somethingRead = new AtomicBoolean(false); // Try reading resources in a jar - final File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().getPath()); + final File jarFile = new File(getClass().getProtectionDomain().getCodeSource().getLocation().toURI()); if (jarFile.isFile()) { readFromJar(jarFile, path, log, successReadingConfig, somethingRead); @@ -108,7 +109,7 @@ public abstract class ConfigFileFinder log.debug("No config read from "+path); } } - catch (IOException e) + catch (IOException | URISyntaxException e) { log.error("Error reading from "+path, e); successReadingConfig.set(false);