Merge remote-tracking branch 'origin/LOG4J2-809'

Conflicts:
        
log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java


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

Branch: refs/heads/master
Commit: 3c9a265dc017edf3a5d027d2db1ebc15b1e5f68d
Parents: a26dab9 f424c7b
Author: Matt Sicker <[email protected]>
Authored: Sun Sep 21 11:54:11 2014 -0500
Committer: Matt Sicker <[email protected]>
Committed: Sun Sep 21 11:54:11 2014 -0500

----------------------------------------------------------------------
 .../org/apache/logging/log4j/LogManager.java    |  85 +++---
 .../logging/log4j/util/ReflectionUtil.java      | 276 +++++++++++++++++++
 .../logging/log4j/util/ReflectionUtilTest.java  |  94 +++++++
 .../core/impl/ReflectiveCallerClassUtility.java | 162 -----------
 .../logging/log4j/core/impl/ThrowableProxy.java |  64 +----
 .../selector/ClassLoaderContextSelector.java    | 102 +------
 .../impl/ReflectiveCallerClassUtilityTest.java  |  43 ---
 .../log4j/perf/jmh/ReflectionBenchmark.java     |   6 +-
 8 files changed, 431 insertions(+), 401 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3c9a265d/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3c9a265d/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java
----------------------------------------------------------------------
diff --cc 
log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java
index fbaaffc,21c8551..87e83f1
--- 
a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java
+++ 
b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ReflectionBenchmark.java
@@@ -20,10 -20,10 +20,10 @@@ import java.lang.reflect.Constructor
  import java.lang.reflect.InvocationTargetException;
  import java.util.Random;
  
- import org.apache.logging.log4j.core.impl.ReflectiveCallerClassUtility;
  import org.apache.logging.log4j.message.Message;
  import org.apache.logging.log4j.message.StringFormattedMessage;
 +import org.openjdk.jmh.annotations.Benchmark;
+ import org.apache.logging.log4j.util.ReflectionUtil;
 -import org.openjdk.jmh.annotations.GenerateMicroBenchmark;
  import org.openjdk.jmh.annotations.Level;
  import org.openjdk.jmh.annotations.Scope;
  import org.openjdk.jmh.annotations.Setup;
@@@ -76,12 -70,12 +76,12 @@@ public class ReflectionBenchmark 
          return Thread.currentThread().getStackTrace()[3].getClassName();
      }
  
 -    @GenerateMicroBenchmark
 +    @Benchmark
      public String test03_getCallerClassNameReflectively() {
-         return ReflectiveCallerClassUtility.getCaller(3).getName();
+         return ReflectionUtil.getCallerClass(3).getName();
      }
  
 -    @GenerateMicroBenchmark
 +    @Benchmark
      public String test04_getCallerClassNameSunReflection() {
          return Reflection.getCallerClass(3).getName();
      }
@@@ -96,12 -90,12 +96,12 @@@
          return 
Class.forName(Thread.currentThread().getStackTrace()[3].getClassName());
      }
  
 -    @GenerateMicroBenchmark
 +    @Benchmark
      public Class<?> test07_getReflectiveCallerClassUtility() {
-         return ReflectiveCallerClassUtility.getCaller(3);
+         return ReflectionUtil.getCallerClass(3);
      }
  
 -    @GenerateMicroBenchmark
 +    @Benchmark
      public Class<?> test08_getDirectSunReflection() {
          return Reflection.getCallerClass(3);
      }

Reply via email to