Author: phuong_vu
Date: 2011-11-07 03:02:35 -0500 (Mon, 07 Nov 2011)
New Revision: 7994
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/Util.java
Log:
GTNPORTAL-2249 Exception when opening Application Registry portlet
Modified:
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/Util.java
===================================================================
---
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/Util.java 2011-11-07
06:54:59 UTC (rev 7993)
+++
portal/trunk/portlet/exoadmin/src/main/java/org/exoplatform/applicationregistry/webui/Util.java 2011-11-07
08:02:35 UTC (rev 7994)
@@ -57,7 +57,17 @@
public int compare(Application app1, Application app2)
{
- return app1.getDisplayName().compareToIgnoreCase(app2.getDisplayName());
+ String firstDisplayName = app1.getDisplayName();
+ if(firstDisplayName == null)
+ {
+ firstDisplayName = "";
+ }
+ String secondDisplayName = app2.getDisplayName();
+ if(secondDisplayName == null)
+ {
+ secondDisplayName = "";
+ }
+ return firstDisplayName.compareToIgnoreCase(secondDisplayName);
}
}
@@ -67,7 +77,17 @@
public int compare(Gadget gadget1, Gadget gadget2)
{
- return gadget1.getTitle().compareToIgnoreCase(gadget2.getTitle());
+ String firstTitle = gadget1.getTitle();
+ if(firstTitle == null)
+ {
+ firstTitle = "";
+ }
+ String secondTitle = gadget2.getTitle();
+ if(secondTitle == null)
+ {
+ secondTitle = "";
+ }
+ return firstTitle.compareToIgnoreCase(secondTitle);
}
}
Show replies by date