logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1566497 - /logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
Date Mon, 10 Feb 2014 03:00:20 GMT
Author: ggregory
Date: Mon Feb 10 03:00:20 2014
New Revision: 1566497

URL: http://svn.apache.org/r1566497
Log:
Do not use magic numbers.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java?rev=1566497&r1=1566496&r2=1566497&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
Mon Feb 10 03:00:20 2014
@@ -190,9 +190,9 @@ public class DefaultRolloverStrategy imp
         String highFilename = subst.replace(buf);
 
         if (highFilename.endsWith(EXT_GZIP)) {
-            suffixLength = 3;
+            suffixLength = EXT_GZIP.length();
         } else if (highFilename.endsWith(EXT_ZIP)) {
-            suffixLength = 4;
+            suffixLength = EXT_ZIP.length();
         }
 
         int maxIndex = 0;



Mime
View raw message