portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r394176 - in /portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl: CustomPortletModeImpl.java CustomWindowStateImpl.java PortletDefinitionImpl.java
Date Fri, 14 Apr 2006 19:08:03 GMT
Author: ate
Date: Fri Apr 14 12:08:00 2006
New Revision: 394176

URL: http://svn.apache.org/viewcvs?rev=394176&view=rev
Log:
Fixing JS2-511.
NPE's thrown from hashCode() methods as result of commons Digester trying to log (using .toString())
digested objects when logging level is set to DEBUG
See: http://issues.us.apache.org/jira/browse/JS2-511

Note: I saw a lot more "interesting" output in jetspeed.log with rootLogging level set to
DEBUG ...

Modified:
    portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java
    portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java
    portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java

Modified: portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java?rev=394176&r1=394175&r2=394176&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomPortletModeImpl.java
Fri Apr 14 12:08:00 2006
@@ -84,7 +84,7 @@
 
     public int hashCode()
     {
-        return customName.hashCode();
+        return customName != null ? customName.hashCode() : super.hashCode();
     }
 
     public boolean equals(Object object)

Modified: portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java?rev=394176&r1=394175&r2=394176&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/CustomWindowStateImpl.java
Fri Apr 14 12:08:00 2006
@@ -86,7 +86,7 @@
 
     public int hashCode()
     {
-        return customName.hashCode();
+        return customName != null ? customName.hashCode() : super.hashCode();
     }
 
     public boolean equals(Object object)

Modified: portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java?rev=394176&r1=394175&r2=394176&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
(original)
+++ portals/jetspeed-2/trunk/components/registry/src/java/org/apache/jetspeed/om/portlet/impl/PortletDefinitionImpl.java
Fri Apr 14 12:08:00 2006
@@ -555,7 +555,10 @@
         hasher.append(name);
         if (app != null)
         {
-            hasher.append(getId().toString());
+            if ( getId() != null )
+            {
+              hasher.append(getId().toString());
+            }
             hasher.append(app.getName());
         }
         return hasher.toHashCode();



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message