Author: chris.laprun(a)jboss.com
Date: 2008-04-21 18:21:13 -0400 (Mon, 21 Apr 2008)
New Revision: 10681
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
Log:
- Fixed an NPE if returned locales were null (which could have happened under some
conditions with WSRP).
Modified:
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java
===================================================================
---
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-04-21
22:20:27 UTC (rev 10680)
+++
branches/JBoss_Portal_Branch_2_7/core-admin/src/main/org/jboss/portal/core/admin/ui/AdminPropertyResolver.java 2008-04-21
22:21:13 UTC (rev 10681)
@@ -194,7 +194,15 @@
public Object getValue(Object bean) throws IllegalArgumentException
{
Portlet portlet = (Portlet)bean;
- return new ArrayList(portlet.getInfo().getCapabilities().getAllLocales());
+ Set<Locale> locales =
portlet.getInfo().getCapabilities().getAllLocales();
+ if (locales != null)
+ {
+ return new ArrayList<Locale>(locales);
+ }
+ else
+ {
+ return Collections.emptyList();
+ }
}
});
portletDecorator.setProperty("smallIconLocation", new
PortletIconPropertyDecorator(PortletIconInfo.SMALL));
Show replies by date