From: Sasha Date: Fri, 26 Apr 2013 17:23:54 +0000 (+0100) Subject: re-formatting code X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=f94688228afd3d3c52123b810a9300c7a985d018;p=jabaws.git re-formatting code --- diff --git a/engine/compbio/engine/Configurator.java b/engine/compbio/engine/Configurator.java index dd90ff4..96c232d 100644 --- a/engine/compbio/engine/Configurator.java +++ b/engine/compbio/engine/Configurator.java @@ -43,16 +43,15 @@ import compbio.util.Util; public class Configurator { private static Logger log = Logger.getLogger(Configurator.class); - - private static final PropertyHelper ph = PropertyHelperManager - .getPropertyHelper(); + private static final PropertyHelper ph = PropertyHelperManager.getPropertyHelper(); public static final boolean IS_LOCAL_ENGINE_ENABLED = initBooleanValue("engine.local.enable"); public static final boolean IS_CLUSTER_ENGINE_ENABLED = initBooleanValue("engine.cluster.enable"); - public final static String LOCAL_WORK_DIRECTORY = initLocalDirectory(); public final static String CLUSTER_WORK_DIRECTORY = initClusterWorkDirectory(); + + private static boolean initBooleanValue(String key) { assert key != null; String status = ph.getProperty(key); @@ -84,17 +83,15 @@ public class Configurator { private static String initLocalDirectory() { String tmp_dir = ph.getProperty("local.tmp.directory"); - // Use system temp directory is local.tmp.directory is not defined + // Use system temporary directory if local.tmp.directory is not defined if (Util.isEmpty(tmp_dir)) { tmp_dir = SysPrefs.getSystemTmpDir(); - log.debug("local.tmp.directory is not defined using system tmp: " - + tmp_dir); + log.debug("local.tmp.directory is not defined using system tmp: " + tmp_dir); } if (!PathValidator.isAbsolutePath(tmp_dir)) { log.debug("local.tmp.directory path is relative! " + tmp_dir); tmp_dir = compbio.engine.client.Util.convertToAbsolute(tmp_dir); - log.debug("local.tmp.directory path changed to absolute: " - + tmp_dir); + log.debug("local.tmp.directory path changed to absolute: " + tmp_dir); } return tmp_dir.trim(); } @@ -146,8 +143,7 @@ public class Configurator { } } // We are here if executable can be executed on both Cluster and Local - // engines - // i.e. provider = Any + // engines i.e. provider = Any // If we still here executable supports All exec environments // Check whether we work on windows if (SysPrefs.isWindows) { @@ -287,9 +283,8 @@ public class Configurator { static boolean isTargetedForLocalExecution( ConfiguredExecutable executable) { - // In the uncommon case that the cluster and local execution temp - // directories are the same, - // in this case the method return true anyway + // In the uncommon case that the cluster and local execution temporary + // directories are the same, in this case the method return true anyway /* * Could have done this String taskDir = executable.getWorkDirectory();