portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ate Douma (JIRA)" <jetspeed-...@portals.apache.org>
Subject [jira] Created: (JS2-1000) Portalstatistics can cause NullPointerException in TreeMap.compare method when request.getRemoteAttr() returns (sometimes) null
Date Mon, 11 May 2009 12:11:46 GMT
Portalstatistics can cause NullPointerException in TreeMap.compare method when request.getRemoteAttr()
returns (sometimes) null
-------------------------------------------------------------------------------------------------------------------------------

                 Key: JS2-1000
                 URL: https://issues.apache.org/jira/browse/JS2-1000
             Project: Jetspeed 2
          Issue Type: Bug
          Components: Statistics
    Affects Versions: 2.1.4, 2.2.0
            Reporter: Ate Douma
            Assignee: Ate Douma
            Priority: Minor
             Fix For: 2.1.4, 2.2.0


In the PortalStatistics, a TreeMap with state for each logged in username is maintained keyed
on the IP address of the current (login/logout) request.
However, request.getRemoteAttr() sometimes might return null (bad request) in which case adding
a null key to the TreeMap might cause a NullPointerException in its internal compare method.
This is not a critical error as failing to record or remove one entry is not causing real
side-effects, and no exception will thrown out from the login/login statistics method, but
it can show up in logging.

I'll provide an easy and non-intrusive fix preventing the NPE in the first place.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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