Author: chris.laprun(a)jboss.com
Date: 2009-11-12 07:04:05 -0500 (Thu, 12 Nov 2009)
New Revision: 578
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
Log:
- Avoid NPE.
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
---
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2009-11-12
10:28:30 UTC (rev 577)
+++
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2009-11-12
12:04:05 UTC (rev 578)
@@ -741,12 +741,30 @@
serviceDescription.setRegistrationPropertyDescription(registrationPropertyDescription.value);
serviceDescription.setRequiresInitCookie(initCookie.value);
serviceDescription.setResourceList(resourceList.value);
- serviceDescription.getCustomModeDescriptions().addAll(modeDescriptions.value);
-
serviceDescription.getCustomUserProfileItemDescriptions().addAll(userProfileItemDescriptions.value);
-
serviceDescription.getCustomWindowStateDescriptions().addAll(windowStateDescriptions.value);
- serviceDescription.getLocales().addAll(locales.value);
- serviceDescription.getOfferedPortlets().addAll(offeredPortlets.value);
-
serviceDescription.getUserCategoryDescriptions().addAll(userCategoryDescriptions.value);
+ if (WSRPUtils.existsAndIsNotEmpty(modeDescriptions.value))
+ {
+
serviceDescription.getCustomModeDescriptions().addAll(modeDescriptions.value);
+ }
+ if (WSRPUtils.existsAndIsNotEmpty(userProfileItemDescriptions.value))
+ {
+
serviceDescription.getCustomUserProfileItemDescriptions().addAll(userProfileItemDescriptions.value);
+ }
+ if (WSRPUtils.existsAndIsNotEmpty(windowStateDescriptions.value))
+ {
+
serviceDescription.getCustomWindowStateDescriptions().addAll(windowStateDescriptions.value);
+ }
+ if (WSRPUtils.existsAndIsNotEmpty(locales.value))
+ {
+ serviceDescription.getLocales().addAll(locales.value);
+ }
+ if (WSRPUtils.existsAndIsNotEmpty(offeredPortlets.value))
+ {
+ serviceDescription.getOfferedPortlets().addAll(offeredPortlets.value);
+ }
+ if (WSRPUtils.existsAndIsNotEmpty(userCategoryDescriptions.value))
+ {
+
serviceDescription.getUserCategoryDescriptions().addAll(userCategoryDescriptions.value);
+ }
return serviceDescription;
}
Show replies by date