Author: adietish
Date: 2011-02-24 11:54:28 -0500 (Thu, 24 Feb 2011)
New Revision: 29315
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
Log:
[JBIDE-8478] added fallback to instance name in case no alias is present
Modified:
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java
===================================================================
---
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-24
15:57:12 UTC (rev 29314)
+++
trunk/deltacloud/plugins/org.jboss.tools.deltacloud.integration/src/org/jboss/tools/deltacloud/integration/rse/util/RSEUtils.java 2011-02-24
16:54:28 UTC (rev 29315)
@@ -70,7 +70,11 @@
public static String createConnectionName(DeltaCloudInstance instance) {
Assert.isLegal(instance != null, "Cannot create connection name: instance is not
defined");
- return instance.getAlias();
+ String connectionName = instance.getAlias();
+ if (connectionName == null || connectionName.length() == 0) {
+ connectionName = instance.getName();
+ }
+ return connectionName;
}
/**
Show replies by date