Author: chris.laprun(a)jboss.com
Date: 2010-06-20 15:53:02 -0400 (Sun, 20 Jun 2010)
New Revision: 3398
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/BasicPortletManagementBehavior.java
Log:
- Avoid NPE.
Modified:
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/BasicPortletManagementBehavior.java
===================================================================
---
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/BasicPortletManagementBehavior.java 2010-06-20
19:52:10 UTC (rev 3397)
+++
components/wsrp/trunk/consumer/src/test/java/org/gatein/wsrp/test/protocol/v1/behaviors/BasicPortletManagementBehavior.java 2010-06-20
19:53:02 UTC (rev 3398)
@@ -179,11 +179,18 @@
WSRP1ExceptionFactory.throwMissingParametersIfValueIsMissing(portletHandles,
"portlet handles", "DestroyPortlets");
}
+ List<V1DestroyFailed> list = destroyFailed.value;
+ if (list == null)
+ {
+ list = new ArrayList<V1DestroyFailed>();
+ destroyFailed.value = list;
+ }
for (String handle : portletHandles)
{
if (!CLONED_HANDLE.equals(handle))
{
- destroyFailed.value.add(WSRP1TypeFactory.createDestroyFailed(handle,
"Handle '" + handle + "' doesn't exist"));
+
+ list.add(WSRP1TypeFactory.createDestroyFailed(handle, "Handle
'" + handle + "' doesn't exist"));
}
}
}