Return-Path: X-Original-To: apmail-commons-commits-archive@minotaur.apache.org Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 51065DF6A for ; Wed, 18 Jul 2012 23:30:26 +0000 (UTC) Received: (qmail 57830 invoked by uid 500); 18 Jul 2012 23:30:26 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 57761 invoked by uid 500); 18 Jul 2012 23:30:25 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 57750 invoked by uid 99); 18 Jul 2012 23:30:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 23:30:25 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Jul 2012 23:30:23 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id BDA852388860 for ; Wed, 18 Jul 2012 23:30:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1363173 - in /commons/proper/logging/trunk: RELEASE-NOTES.txt src/java/org/apache/commons/logging/impl/SimpleLog.java Date: Wed, 18 Jul 2012 23:30:03 -0000 To: commits@commons.apache.org From: sebb@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120718233003.BDA852388860@eris.apache.org> Author: sebb Date: Wed Jul 18 23:30:03 2012 New Revision: 1363173 URL: http://svn.apache.org/viewvc?rev=1363173&view=rev Log: LOGGING-147 - SimpleLog.log - unsafe update of shortLogName Modified: commons/proper/logging/trunk/RELEASE-NOTES.txt commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/SimpleLog.java Modified: commons/proper/logging/trunk/RELEASE-NOTES.txt URL: http://svn.apache.org/viewvc/commons/proper/logging/trunk/RELEASE-NOTES.txt?rev=1363173&r1=1363172&r2=1363173&view=diff ============================================================================== --- commons/proper/logging/trunk/RELEASE-NOTES.txt (original) +++ commons/proper/logging/trunk/RELEASE-NOTES.txt Wed Jul 18 23:30:03 2012 @@ -22,6 +22,7 @@ LOGGING-130 - Potential missing privileg LOGGING-145 - LogFactoryImpl.setAttribute - possible NPE LOGGING-142 - Log4JLogger uses deprecated static members of Priority such as INFO LOGGING-128 - Static analysis suggests a number of potential improvements +LOGGING-147 - SimpleLog.log - unsafe update of shortLogName $Id$ Modified: commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/SimpleLog.java URL: http://svn.apache.org/viewvc/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/SimpleLog.java?rev=1363173&r1=1363172&r2=1363173&view=diff ============================================================================== --- commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/SimpleLog.java (original) +++ commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/SimpleLog.java Wed Jul 18 23:30:03 2012 @@ -311,9 +311,8 @@ public class SimpleLog implements Log, S if( showShortName) { if( shortLogName==null ) { // Cut all but the last component of the name for both styles - shortLogName = logName.substring(logName.lastIndexOf(".") + 1); - shortLogName = - shortLogName.substring(shortLogName.lastIndexOf("/") + 1); + String slName = logName.substring(logName.lastIndexOf(".") + 1); + shortLogName = slName.substring(slName.lastIndexOf("/") + 1); } buf.append(String.valueOf(shortLogName)).append(" - "); } else if(showLogName) {