Author: adietish
Date: 2010-11-25 14:06:43 -0500 (Thu, 25 Nov 2010)
New Revision: 26953
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
Log:
fixed NPE
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-11-25
19:04:55 UTC (rev 26952)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/internal/deltacloud/ui/wizards/EditCloudConnectionWizard.java 2010-11-25
19:06:43 UTC (rev 26953)
@@ -24,6 +24,7 @@
import org.jboss.tools.deltacloud.core.DeltaCloud;
import org.jboss.tools.deltacloud.core.DeltaCloudException;
import org.jboss.tools.deltacloud.core.DeltaCloudManager;
+import org.jboss.tools.deltacloud.core.client.DeltaCloudClientImpl.DeltaCloudServerType;
import org.jboss.tools.deltacloud.ui.Activator;
import org.jboss.tools.deltacloud.ui.ErrorUtils;
@@ -100,7 +101,7 @@
String url = mainPage.getModel().getUrl();
String username = mainPage.getModel().getUsername();
String password = mainPage.getModel().getPassword();
- String type = mainPage.getModel().getType().toString();
+ String type = getServerType();
try {
String oldName = cloud.getName();
cloud.editCloud(name, url, username, password, type);
@@ -113,6 +114,15 @@
return true;
}
+ private String getServerType() {
+ DeltaCloudServerType type = mainPage.getModel().getType();
+ if (type == null) {
+ return null;
+ }
+
+ return type.toString();
+ }
+
@Override
public boolean needsProgressMonitor() {
return true;
Show replies by date