Repository: logging-log4j2
Updated Branches:
  refs/heads/master c97864bb2 -> ce7e49839


Always use a {} block.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/ce7e4983
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/ce7e4983
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/ce7e4983

Branch: refs/heads/master
Commit: ce7e4983999799c22feedef457df60c7e6e8e31a
Parents: c97864b
Author: Gary Gregory <ggreg...@apache.org>
Authored: Mon Sep 19 22:21:17 2016 -0700
Committer: Gary Gregory <ggreg...@apache.org>
Committed: Mon Sep 19 22:21:17 2016 -0700

----------------------------------------------------------------------
 .../apache/logging/log4j/perf/nogc/OpenHashMapContextData.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/ce7e4983/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/OpenHashMapContextData.java
----------------------------------------------------------------------
diff --git 
a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/OpenHashMapContextData.java
 
b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/OpenHashMapContextData.java
index df919a8..07b2294 100644
--- 
a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/OpenHashMapContextData.java
+++ 
b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/nogc/OpenHashMapContextData.java
@@ -651,8 +651,9 @@ public class OpenHashMapContextData<K, V> implements 
MutableContextData, ThreadC
      */
     public boolean trim(final int n) {
         final int l = HashCommon.nextPowerOfTwo((int) Math.ceil(n / 
loadFactor));
-        if (l >= n || size > HashCommon.maxFill(l, loadFactor))
-            return true;
+        if (l >= n || size > HashCommon.maxFill(l, loadFactor)) {
+                       return true;
+               }
         try {
             rehash(l);
         } catch (OutOfMemoryError cantDoIt) { // unusual to catch OOME but in 
this case appropriate

Reply via email to