portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r773540 - /portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
Date Mon, 11 May 2009 12:33:19 GMT
Author: ate
Date: Mon May 11 12:33:19 2009
New Revision: 773540

URL: http://svn.apache.org/viewvc?rev=773540&view=rev
Log:
JS2-1000 (!): 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.1.3-POSTRELEASE/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java

Modified: portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
URL: http://svn.apache.org/viewvc/portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java?rev=773540&r1=773539&r2=773540&view=diff
==============================================================================
--- portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
(original)
+++ portals/jetspeed-2/portal/branches/JETSPEED-2.1.3-POSTRELEASE/components/statistics/src/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
Mon May 11 12:33:19 2009
@@ -356,6 +356,10 @@
 
             if (!"guest".equals(userName))
             {
+                if (ipAddress == null)
+                {
+                    ipAddress = "";
+                }
                 synchronized (currentUsers)
                 {
                 	UserStats userStats = null;
@@ -427,7 +431,11 @@
             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