Author: adietish
Date: 2011-05-27 04:22:20 -0400 (Fri, 27 May 2011)
New Revision: 31545
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
Log:
[JBIDE-8860] displaying empty string instead of "null" if instance has no key
Modified:
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java
===================================================================
---
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2011-05-27
08:22:01 UTC (rev 31544)
+++
branches/jbosstools-3.2.x/deltacloud/plugins/org.jboss.tools.deltacloud.ui/src/org/jboss/tools/deltacloud/ui/views/cloud/property/InstancePropertySource.java 2011-05-27
08:22:20 UTC (rev 31545)
@@ -101,25 +101,25 @@
@Override
public Object getPropertyValue(Object id) {
if (id.equals(PROPERTY_NAME)) {
- return instance.getName();
+ return StringUtils.null2EmptyString(instance.getName());
}
if (id.equals(PROPERTY_ALIAS)) {
- return instance.getAlias();
+ return StringUtils.null2EmptyString(instance.getAlias());
}
if (id.equals(PROPERTY_ID)) {
- return instance.getId();
+ return StringUtils.null2EmptyString(instance.getId());
}
if (id.equals(PROPERTY_OWNER)) {
- return instance.getOwnerId();
+ return StringUtils.null2EmptyString(instance.getOwnerId());
}
if (id.equals(PROPERTY_PROFILEID)) {
- return instance.getProfileId();
+ return StringUtils.null2EmptyString(instance.getProfileId());
}
if (id.equals(PROPERTY_REALMID)) {
- return instance.getRealmId();
+ return StringUtils.null2EmptyString(instance.getRealmId());
}
if (id.equals(PROPERTY_IMAGEID)) {
- return instance.getImageId();
+ return StringUtils.null2EmptyString(instance.getImageId());
}
if (id.equals(PROPERTY_KEYNAME)) {
return StringUtils.null2EmptyString(instance.getKeyId());
@@ -130,7 +130,7 @@
if (id.equals(PROPERTY_HOSTNAME)) {
List<String> hostnames = instance.getHostNames();
if (hostnames.size() >= 1) {
- return hostnames.get(0);
+ return StringUtils.null2EmptyString(hostnames.get(0));
}
}
return null;
Show replies by date