Permalink
Browse files

test network name for a blank value as well as null

  • Loading branch information...
1 parent ae796cd commit 087ebd2999637ffd70edcac8503f13c0837dc670 @buzztroll buzztroll committed Apr 11, 2012
@@ -139,7 +139,7 @@ void validate() throws Exception {
}
if (this.customCPUs < 1) {
throw new Exception("Invalid: custom RA CPUs is zero " +
- "or negative: " + this.customMemory);
+ "or negative: " + this.customCPUs);
}
if (this.vmmType == null || this.vmmType.trim().length() == 0) {
@@ -347,7 +347,7 @@ public RunInstancesResponseType translateCreateResult(CreateResult result,
}
final NIC[] nics;
- if (networkName != null) {
+ if (networkName != null && !networkName.trim().equals("")) {
nics = new NIC[1];
nics[0] = this.oneRequestedNIC(networkName, "autoeth0");
}

0 comments on commit 087ebd2

Please sign in to comment.