Author: chris.laprun(a)jboss.com
Date: 2010-10-13 14:43:42 -0400 (Wed, 13 Oct 2010)
New Revision: 4660
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
Log:
- Improved slightly (displayName is never null in that part of the code...)
Modified:
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java
===================================================================
---
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-10-13
18:41:31 UTC (rev 4659)
+++
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/webui/application/UIPortlet.java 2010-10-13
18:43:42 UTC (rev 4660)
@@ -50,6 +50,7 @@
import org.exoplatform.webui.event.Event.Phase;
import org.gatein.common.i18n.LocalizedString;
import org.gatein.common.net.media.MediaType;
+import org.gatein.common.util.ParameterValidation;
import org.gatein.pc.api.Mode;
import org.gatein.pc.api.NoSuchPortletException;
import org.gatein.pc.api.PortletContext;
@@ -395,19 +396,17 @@
}
else
{
- String value = null;
- if (displayName != null)
+ RequestContext i = PortalRequestContext.getCurrentInstance();
+ Locale locale = i.getLocale();
+ String value = displayName.getString(locale, true);
+
+ if (ParameterValidation.isNullOrEmpty(value))
{
- RequestContext i = PortalRequestContext.getCurrentInstance();
- Locale locale = i.getLocale();
- value = displayName.getString(locale, true);
- }
- if (value == null || value.length() == 0)
- {
org.gatein.pc.api.Portlet portlet = getProducedOfferedPortlet();
PortletInfo info = portlet.getInfo();
value = info.getName();
}
+
return value;
}
}
Show replies by date