jford 2004/08/16 15:33:45
Modified: fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager
FusionPAM.java
Log:
Added checks for null and empty titles
Revision Changes Path
1.14 +14 -14
jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager/FusionPAM.java
Index: FusionPAM.java
===================================================================
RCS file:
/home/cvs/jakarta-jetspeed/fusion/src/java/org/apache/jetspeed/fusion/tools/pamanager/FusionPAM.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- FusionPAM.java 10 Aug 2004 04:15:24 -0000 1.13
+++ FusionPAM.java 16 Aug 2004 22:33:44 -0000 1.14
@@ -227,13 +227,13 @@
entry.setType(JS1_REFERENCE_TYPE);
Description desc =
portletDefinition.getDescription(Jetspeed.getDefaultLocale());
- if(desc != null)
+ if(desc != null && desc.getDescription() != null &&
desc.getDescription().length() > 0)
{
entry.setDescription(desc.getDescription());
}
DisplayName title =
portletDefinition.getDisplayName(Jetspeed.getDefaultLocale());
- if (title != null)
+ if (title != null && title.getDisplayName() != null &&
title.getDisplayName().length() > 0)
{
entry.setTitle(title.getDisplayName());
}
@@ -243,24 +243,24 @@
if (lang != null)
{
String tit = lang.getShortTitle();
- if (tit == null)
- {
- tit = lang.getTitle();
- if (tit != null)
- {
- entry.setTitle(tit);
- }
- }
- else
+ if(tit != null && tit.length() > 0)
{
entry.setTitle(tit);
- if (desc == null)
+ if (desc == null || desc.getDescription() == null ||
desc.getDescription().length() == 0)
{
String descTitle = lang.getTitle();
- if (descTitle != null)
+ if (descTitle != null && descTitle.length() > 0)
{
entry.setDescription(descTitle);
}
+ }
+ }
+ else
+ {
+ tit = lang.getTitle();
+ if (tit != null && tit.length() > 0)
+ {
+ entry.setTitle(tit);
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]