re-formatting code
authorSasha <asherstnev@main-laptop2>
Fri, 26 Apr 2013 17:23:54 +0000 (18:23 +0100)
committerSasha <asherstnev@main-laptop2>
Fri, 26 Apr 2013 17:23:54 +0000 (18:23 +0100)
engine/compbio/engine/Configurator.java

index dd90ff4..96c232d 100644 (file)
@@ -43,16 +43,15 @@ import compbio.util.Util;
 public class Configurator {\r
 \r
        private static Logger log = Logger.getLogger(Configurator.class);\r
-\r
-       private static final PropertyHelper ph = PropertyHelperManager\r
-                       .getPropertyHelper();\r
+       private static final PropertyHelper ph = PropertyHelperManager.getPropertyHelper();\r
 \r
        public static final boolean IS_LOCAL_ENGINE_ENABLED = initBooleanValue("engine.local.enable");\r
        public static final boolean IS_CLUSTER_ENGINE_ENABLED = initBooleanValue("engine.cluster.enable");\r
-\r
        public final static String LOCAL_WORK_DIRECTORY = initLocalDirectory();\r
        public final static String CLUSTER_WORK_DIRECTORY = initClusterWorkDirectory();\r
 \r
+\r
+\r
        private static boolean initBooleanValue(String key) {\r
                assert key != null;\r
                String status = ph.getProperty(key);\r
@@ -84,17 +83,15 @@ public class Configurator {
 \r
        private static String initLocalDirectory() {\r
                String tmp_dir = ph.getProperty("local.tmp.directory");\r
-               // Use system temp directory is local.tmp.directory is not defined\r
+               // Use system temporary directory if local.tmp.directory is not defined\r
                if (Util.isEmpty(tmp_dir)) {\r
                        tmp_dir = SysPrefs.getSystemTmpDir();\r
-                       log.debug("local.tmp.directory is not defined using system tmp: "\r
-                                       + tmp_dir);\r
+                       log.debug("local.tmp.directory is not defined using system tmp: " + tmp_dir);\r
                }\r
                if (!PathValidator.isAbsolutePath(tmp_dir)) {\r
                        log.debug("local.tmp.directory path is relative! " + tmp_dir);\r
                        tmp_dir = compbio.engine.client.Util.convertToAbsolute(tmp_dir);\r
-                       log.debug("local.tmp.directory path changed to absolute: "\r
-                                       + tmp_dir);\r
+                       log.debug("local.tmp.directory path changed to absolute: " + tmp_dir);\r
                }\r
                return tmp_dir.trim();\r
        }\r
@@ -146,8 +143,7 @@ public class Configurator {
                        }\r
                }\r
                // We are here if executable can be executed on both Cluster and Local\r
-               // engines\r
-               // i.e. provider = Any\r
+               // engines i.e. provider = Any\r
                // If we still here executable supports All exec environments\r
                // Check whether we work on windows\r
                if (SysPrefs.isWindows) {\r
@@ -287,9 +283,8 @@ public class Configurator {
 \r
        static boolean isTargetedForLocalExecution(\r
                        ConfiguredExecutable<?> executable) {\r
-               // In the uncommon case that the cluster and local execution temp\r
-               // directories are the same,\r
-               // in this case the method return true anyway\r
+               // In the uncommon case that the cluster and local execution temporary\r
+               // directories are the same, in this case the method return true anyway\r
 \r
                /*\r
                 * Could have done this String taskDir = executable.getWorkDirectory();\r