Return-Path: Delivered-To: apmail-portals-jetspeed-dev-archive@www.apache.org Received: (qmail 62159 invoked from network); 11 May 2009 12:12:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 11 May 2009 12:12:11 -0000 Received: (qmail 71055 invoked by uid 500); 11 May 2009 12:12:11 -0000 Delivered-To: apmail-portals-jetspeed-dev-archive@portals.apache.org Received: (qmail 71018 invoked by uid 500); 11 May 2009 12:12:10 -0000 Mailing-List: contact jetspeed-dev-help@portals.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jetspeed Developers List" Delivered-To: mailing list jetspeed-dev@portals.apache.org Received: (qmail 70759 invoked by uid 99); 11 May 2009 12:12:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2009 12:12:10 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 May 2009 12:12:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 33A67234C051 for ; Mon, 11 May 2009 05:11:46 -0700 (PDT) Message-ID: <550055033.1242043906210.JavaMail.jira@brutus> Date: Mon, 11 May 2009 05:11:46 -0700 (PDT) From: "Ate Douma (JIRA)" To: jetspeed-dev@portals.apache.org Subject: [jira] Created: (JS2-1000) Portalstatistics can cause NullPointerException in TreeMap.compare method when request.getRemoteAttr() returns (sometimes) null MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org 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