[Swift-commit] cog r4034
swift at ci.uchicago.edu
swift at ci.uchicago.edu
Thu Jul 24 17:40:03 CDT 2014
------------------------------------------------------------------------
r4034 | timgarmstrong | 2014-07-24 17:39:37 -0500 (Thu, 24 Jul 2014) | 1 line
Throw exception on empty settings key
------------------------------------------------------------------------
Index: modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java
===================================================================
--- modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (revision 4033)
+++ modules/provider-coaster/src/org/globus/cog/abstraction/coaster/service/job/manager/Settings.java (working copy)
@@ -58,7 +58,7 @@
*/
private int slots = 20;
private int jobsPerNode = 1;
-
+
/**
* TODO: clarify what this does
*/
@@ -119,7 +119,7 @@
private SecurityContext securityContext;
private boolean remoteMonitorEnabled;
-
+
/**
* Adjusts the metric used for block sizes.
*
@@ -160,9 +160,9 @@
private String directory = null;
private String useHashBang = null;
-
+
private String perfTraceWorker = "false";
-
+
private int perfTraceInterval = -1;
private final Map<String, String> attributes;
@@ -320,23 +320,23 @@
public String getPerfTraceWorker() {
return perfTraceWorker;
}
-
+
public void setPerfTraceWorker(String perfTraceWorker) {
this.perfTraceWorker = perfTraceWorker;
}
-
+
public int getPerfTraceInterval() {
return perfTraceInterval;
}
-
+
public void setPerfTraceInterval(int perfTraceInterval) {
this.perfTraceInterval = perfTraceInterval;
}
-
+
/**
* The following values are considered valid:
* <dl>
@@ -494,7 +494,7 @@
public String getCoresPerNode() {
return coresPerNode;
}
-
+
public void setCoresPerNode(String coresPerNode) {
this.coresPerNode=coresPerNode;
}
@@ -551,7 +551,7 @@
public void setUseHashBang(String uhb) {
this.useHashBang = uhb;
}
-
+
public void setAttribute(String name, String value) {
attributes.put(name, value);
}
@@ -569,6 +569,11 @@
if (logger.isDebugEnabled()) {
logger.debug("Setting " + name + " to " + value);
}
+ if (name.length() == 0) {
+ throw new IllegalArgumentException("Empty string Settings key "
+ + "(value was \"" + value + "\"");
+ }
+
boolean complete = false;
Method[] methods = getClass().getMethods();
String setterName = "set" +
More information about the Swift-commit
mailing list