1
0

LOGGING-147 - SimpleLog.log - unsafe update of shortLogName

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/logging/trunk@1363173 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley
2012-07-18 23:30:03 +00:00
parent e8c77e524e
commit 7eada4cf49
2 changed files with 3 additions and 3 deletions

View File

@@ -22,6 +22,7 @@ LOGGING-130 - Potential missing privileged block for class loader
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$

View File

@@ -311,9 +311,8 @@ public class SimpleLog implements Log, Serializable {
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) {