fixed uri.scheme null bug

This commit is contained in:
anthony 2011-06-13 19:32:02 -07:00
parent 024603ddb6
commit 1ac24cf4c8
1 changed files with 7 additions and 5 deletions

View File

@ -865,12 +865,14 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, ResourceS
password = clusterDetails.get("password");
assert(password != null);
try {
uri = new URI(UriUtils.encodeURIComponent(url));
if(hypervisorType.equalsIgnoreCase(HypervisorType.VMware.toString())) {
try {
uri = new URI(UriUtils.encodeURIComponent(url));
url = clusterDetails.get("url") + "/" + uri.getHost();
} catch (URISyntaxException e) {
throw new InvalidParameterValueException(url + " is not a valid uri");
url = clusterDetails.get("url") + "/" + uri.getHost();
} catch (URISyntaxException e) {
throw new InvalidParameterValueException(url + " is not a valid uri");
}
}
} else {
if(hypervisorType.equalsIgnoreCase(HypervisorType.VMware.toString()))