X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=engine%2Fcompbio%2Fengine%2Fconf%2FPropertyHelperManager.java;h=fb353624e1191b712494795128b5238de05fbb37;hb=ba2d4e920e433bd080f448248e7dacade69a27a0;hp=e8aa9a7d745b29552b21234afe490b78a8340f19;hpb=535359a3d592ee41bda72e7356f0181f6cee9d07;p=jabaws.git diff --git a/engine/compbio/engine/conf/PropertyHelperManager.java b/engine/compbio/engine/conf/PropertyHelperManager.java index e8aa9a7..fb35362 100644 --- a/engine/compbio/engine/conf/PropertyHelperManager.java +++ b/engine/compbio/engine/conf/PropertyHelperManager.java @@ -23,8 +23,6 @@ import java.io.IOException; import java.net.URISyntaxException; import java.net.URL; -import javax.naming.ConfigurationException; - import org.apache.log4j.Logger; import compbio.util.PropertyHelper; @@ -52,7 +50,7 @@ public final class PropertyHelperManager { * * Try 1 - succeed. * - * @return + * @return an instance */ public static PropertyHelper getPropertyHelper() { if (ph == null) { @@ -66,8 +64,9 @@ public final class PropertyHelperManager { ph = new PropertyHelper(locEngineProp, clustEngineProp, execProp); } catch (IOException e) { - log.warn("Cannot read property files! Reason: " - + e.getLocalizedMessage(), e.getCause()); + log.warn( + "Cannot read property files! Reason: " + + e.getLocalizedMessage(), e.getCause()); } } return ph; @@ -90,8 +89,9 @@ public final class PropertyHelperManager { * binaries WEB-INF classes compbio engine conf If the structure changes it * must be reflected in this method * - * @return - * @throws ConfigurationException + * @return the local path + * @throws RuntimeException + * if cannot determine the local path */ public static String getLocalPath() { String clname = PropertyHelperManager.class.getSimpleName(); @@ -111,11 +111,10 @@ public final class PropertyHelperManager { } catch (IllegalArgumentException e) { // Classes are in the jar file, using different method to determine // the path new File(INCORRECT URL) throws it - log - .warn( - "It looks like classes are in the jar file. " - + "Attempting a different method to determinine the path to the resources " - + e.getLocalizedMessage(), e.getCause()); + log.debug( + "It looks like classes are in the jar file. " + + "Attempting a different method to determinine the path to the resources " + + e.getLocalizedMessage(), e.getCause()); try { f = new File(PropertyHelperManager.class.getProtectionDomain() .getCodeSource().getLocation().toURI().getPath()); @@ -128,8 +127,9 @@ public final class PropertyHelperManager { f = f.getParentFile(); } } catch (URISyntaxException e1) { - log.error("Could not find resources path! " - + e1.getLocalizedMessage(), e1.getCause()); + log.error( + "Could not find resources path! " + + e1.getLocalizedMessage(), e1.getCause()); throw new RuntimeException("Could not find resources path! ", e1.getCause()); }