portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vku...@apache.org
Subject svn commit: r773549 - /portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
Date Mon, 11 May 2009 12:55:41 GMT
Author: vkumar
Date: Mon May 11 12:55:41 2009
New Revision: 773549

URL: http://svn.apache.org/viewvc?rev=773549&view=rev
Log:
Portalstatistics can cause NullPointerException in TreeMap.compare method when request.getRemoteAttr()
returns (sometimes) null
See: https://issues.apache.org/jira/browse/JS2-1000
Minor fix to PortalStatisticsImpl to protect against NULL remote IP addresses.

Modified:
    portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java?rev=773549&r1=773548&r2=773549&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.2-PRE-PLUTO-2-SNAPSHOT/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
Mon May 11 12:55:41 2009
@@ -356,6 +356,10 @@
 
             if (!"guest".equals(userName))
             {
+                if (ipAddress == null)
+                {
+                    ipAddress = "";
+                }
                 synchronized (currentUsers)
                 {
                 	UserStats userStats = null;
@@ -427,7 +431,10 @@
             if (!"guest".equals(userName))
             {
                 currentUserCount = currentUserCount + 1;
-
+                if (ipAddress == null)
+                {
+                    ipAddress = "";
+                }
                 synchronized (currentUsers)
                 {
                 	



---------------------------------------------------------------------
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