You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2016/03/19 06:03:14 UTC
[06/11] logging-log4j2 git commit: lvar hides ivar.
lvar hides ivar.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/00c50aee
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/00c50aee
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/00c50aee
Branch: refs/heads/LOG4J2-1278-gc-free-logger
Commit: 00c50aeeae5ec1b2c95e3cf03b3893c790978c1c
Parents: d3ab3be
Author: ggregory <gg...@apache.org>
Authored: Fri Mar 18 16:21:25 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Fri Mar 18 16:21:25 2016 -0700
----------------------------------------------------------------------
.../appender/rolling/DefaultRolloverStrategy.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/00c50aee/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
index c618d59..0a54783 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
@@ -294,14 +294,14 @@ public class DefaultRolloverStrategy implements RolloverStrategy {
manager.getPatternProcessor().formatFileName(subst, buf, highIndex);
String highFilename = subst.replace(buf);
final int suffixLength = suffixLength(highFilename);
- int maxIndex = 0;
+ int curMaxIndex = 0;
for (int i = highIndex; i >= lowIndex; i--) {
File toRename = new File(highFilename);
if (i == highIndex && toRename.exists()) {
- maxIndex = highIndex;
- } else if (maxIndex == 0 && toRename.exists()) {
- maxIndex = i + 1;
+ curMaxIndex = highIndex;
+ } else if (curMaxIndex == 0 && toRename.exists()) {
+ curMaxIndex = i + 1;
break;
}
@@ -361,8 +361,8 @@ public class DefaultRolloverStrategy implements RolloverStrategy {
highFilename = subst.replace(buf);
}
}
- if (maxIndex == 0) {
- maxIndex = lowIndex;
+ if (curMaxIndex == 0) {
+ curMaxIndex = lowIndex;
}
//
@@ -381,7 +381,7 @@ public class DefaultRolloverStrategy implements RolloverStrategy {
return -1;
}
}
- return maxIndex;
+ return curMaxIndex;
}
/**