Change the way to deal with Limits to simplify wrapper writing and enable couping...
[jabaws.git] / runner / compbio / runner / Util.java
index 2f040aa..189ded7 100644 (file)
@@ -67,19 +67,15 @@ public final class Util {
         *         separate options options.add(option); } return options; }\r
         */\r
 \r
-       public static <T> LimitsManager<T> getLimits(\r
-                       Class<? extends Executable<T>> clazz) {\r
-               LimitsManager<T> limits = null;\r
+       public static <T> LimitsManager<T> getLimits(Class<Executable<T>> clazz) {\r
+               LimitsManager<T> limits = new LimitsManager<T>();\r
                try {\r
                        limits = ConfExecutable.getRunnerLimits(clazz);\r
-                       if (limits == null) {\r
-                               return null;\r
-                       }\r
                } catch (FileNotFoundException e) {\r
                        log.warn(\r
                                        "No limits are found for " + clazz + " executable! "\r
                                                        + e.getLocalizedMessage(), e.getCause());\r
-                       return null;\r
+                       // its ok, limit may not be initialized\r
                } catch (IOException e) {\r
                        log.warn("IO exception while attempting to read limits for "\r
                                        + clazz + " executable! " + e.getLocalizedMessage(),\r