You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2012/07/19 01:30:03 UTC
svn commit: r1363173 - in /commons/proper/logging/trunk: RELEASE-NOTES.txt
src/java/org/apache/commons/logging/impl/SimpleLog.java
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) {