airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From samin...@apache.org
Subject svn commit: r1348651 - /incubator/airavata/branches/0.3-incubating-snapshot/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
Date Sun, 10 Jun 2012 19:44:56 GMT
Author: samindaw
Date: Sun Jun 10 19:44:55 2012
New Revision: 1348651

URL: http://svn.apache.org/viewvc?rev=1348651&view=rev
Log:
fixed NPE issue when loading the appl desc dialog

Modified:
    incubator/airavata/branches/0.3-incubating-snapshot/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java

Modified: incubator/airavata/branches/0.3-incubating-snapshot/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
URL: http://svn.apache.org/viewvc/incubator/airavata/branches/0.3-incubating-snapshot/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java?rev=1348651&r1=1348650&r2=1348651&view=diff
==============================================================================
--- incubator/airavata/branches/0.3-incubating-snapshot/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
(original)
+++ incubator/airavata/branches/0.3-incubating-snapshot/modules/xbaya-gui/src/main/java/org/apache/airavata/xbaya/appwrapper/ApplicationDescriptionDialog.java
Sun Jun 10 19:44:55 2012
@@ -653,20 +653,24 @@ public class ApplicationDescriptionDialo
 
     public void setHostName(String hostName) {
         this.hostName = hostName;
-        HostDescription hostDescription;
-		try {
-			hostDescription = registry.getHostDescription(hostName);
-			if (hostDescription.getType() instanceof GlobusHostType){
-	        	getShellApplicationDescription().getType().changeType(GramApplicationDeploymentType.type);
-	        }else{
-	        	getShellApplicationDescription().getType().changeType(ApplicationDeploymentDescriptionType.type);
-	        }
-			btnHostAdvanceOptions.setVisible(hostDescription.getType() instanceof GlobusHostType);
-		} catch (RegistryException e) {
-			//not there - ouch
+        if (hostName!=null) {
+			HostDescription hostDescription;
+			try {
+				hostDescription = registry.getHostDescription(hostName);
+				if (hostDescription.getType() instanceof GlobusHostType) {
+					getShellApplicationDescription().getType().changeType(
+							GramApplicationDeploymentType.type);
+				} else {
+					getShellApplicationDescription().getType().changeType(
+							ApplicationDeploymentDescriptionType.type);
+				}
+				btnHostAdvanceOptions
+						.setVisible(hostDescription.getType() instanceof GlobusHostType);
+			} catch (RegistryException e) {
+				//not there - ouch
+			}
 		}
-        
-        updateDialogStatus();
+		updateDialogStatus();
     }
 
     private void updateServiceName() {



Mime
View raw message