portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r773539 - /portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
Date Mon, 11 May 2009 12:33:15 GMT
Author: ate
Date: Mon May 11 12:33:14 2009
New Revision: 773539

URL: http://svn.apache.org/viewvc?rev=773539&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/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java

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