[Swift-commit] cog r4029

swift at ci.uchicago.edu swift at ci.uchicago.edu
Wed Jul 23 21:05:02 CDT 2014


------------------------------------------------------------------------
r4029 | hategan | 2014-07-23 21:00:23 -0500 (Wed, 23 Jul 2014) | 1 line

fixed scheduler property parsing error(s) (swift bug 1301)
------------------------------------------------------------------------
Index: modules/karajan/src/org/globus/cog/karajan/scheduler/WeightedHostScoreScheduler.java
===================================================================
--- modules/karajan/src/org/globus/cog/karajan/scheduler/WeightedHostScoreScheduler.java	(revision 4028)
+++ modules/karajan/src/org/globus/cog/karajan/scheduler/WeightedHostScoreScheduler.java	(working copy)
@@ -119,11 +119,11 @@
 				thisJobThrottle = floatThrottleValue(contact.getProperty(JOB_THROTTLE));
 			}
 			if (contact.hasProperty(DELAY_BASE)) {
-				thisDelayBase = Double.parseDouble((String) contact.getProperty(DELAY_BASE));
+				thisDelayBase = TypeUtil.toDouble(contact.getProperty(DELAY_BASE));
 			}
 			WeightedHost wh;
 			if (contact.hasProperty(INITIAL_SCORE)) {
-				thisInitialScore = Double.parseDouble((String) contact.getProperty(INITIAL_SCORE));
+				thisInitialScore = TypeUtil.toDouble(contact.getProperty(INITIAL_SCORE));
 			}
 			wh = new WeightedHost(contact, thisInitialScore, 0, thisJobThrottle, thisDelayBase);
 			addToSorted(wh);
@@ -378,7 +378,7 @@
 				defaultJobThrottle = floatThrottleValue(value);
 			}
 			else if (DELAY_BASE.equals(name)) {
-				defaultDelayBase = Double.parseDouble((String) value);
+				defaultDelayBase = TypeUtil.toDouble(value);
 			}
 			else {
 				double val = TypeUtil.toDouble(value);



More information about the Swift-commit mailing list