You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by at...@apache.org on 2009/05/11 14:33:15 UTC
svn commit: r773539 -
/portals/jetspeed-2/portal/trunk/components/jetspeed-statistics/src/main/java/org/apache/jetspeed/statistics/impl/PortalStatisticsImpl.java
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