Author: chris.laprun(a)jboss.com
Date: 2007-11-12 11:13:01 -0500 (Mon, 12 Nov 2007)
New Revision: 8884
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestProducerBehavior.java
Log:
- Handle null suffix better.
Modified:
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestProducerBehavior.java
===================================================================
---
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestProducerBehavior.java 2007-11-12
15:30:47 UTC (rev 8883)
+++
branches/JBoss_Portal_Branch_2_6/wsrp/src/main/org/jboss/portal/test/wsrp/framework/TestProducerBehavior.java 2007-11-12
16:13:01 UTC (rev 8884)
@@ -61,11 +61,13 @@
portletDesc.setPortletHandle(portletHandle);
portletDesc.setMarkupTypes(new MarkupType[]{new MarkupType("text/html",
new String[]{WSRPConstants.NORMAL_WINDOW_STATE},
new String[]{WSRPConstants.VIEW_MODE}, WSRPConstants.DEFAULT_LOCALES, null)});
-
portletDesc.setDescription(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_DESCRIPTION
+ suffix));
-
portletDesc.setTitle(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_TITLE
+ suffix));
-
portletDesc.setShortTitle(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_SHORTTITLE
+ suffix));
-
portletDesc.setDisplayName(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_DISPLAYNAME
+ suffix));
- portletDesc.setKeywords(new
LocalizedString[]{ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_KEYWORD
+ suffix)});
+
+ String suffixString = suffix == null ? "" : suffix;
+
portletDesc.setDescription(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_DESCRIPTION
+ suffixString));
+
portletDesc.setTitle(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_TITLE
+ suffixString));
+
portletDesc.setShortTitle(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_SHORTTITLE
+ suffixString));
+
portletDesc.setDisplayName(ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_DISPLAYNAME
+ suffixString));
+ portletDesc.setKeywords(new
LocalizedString[]{ServiceObjectFactory.createLocalizedString(ServiceObjectFactory.SAMPLE_KEYWORD
+ suffixString)});
return portletDesc;
}
}