Repository: logging-log4j2
Updated Branches:
  refs/heads/master 6c4a094b0 -> 1d94c3d20


Remove unnecessary casts.

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

Branch: refs/heads/master
Commit: 1d94c3d2068a02c6a92a7b8f4f6d6467fd37ac98
Parents: 6c4a094
Author: Gary Gregory <ggreg...@apache.org>
Authored: Mon Sep 19 22:26:18 2016 -0700
Committer: Gary Gregory <ggreg...@apache.org>
Committed: Mon Sep 19 22:26:18 2016 -0700

----------------------------------------------------------------------
 .../jpa/converter/ContextDataJsonAttributeConverterTest.java | 4 ++--
 .../logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java   | 2 +-
 .../logging/log4j/perf/nogc/OpenHashMapContextData.java      | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1d94c3d2/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextDataJsonAttributeConverterTest.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextDataJsonAttributeConverterTest.java
 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextDataJsonAttributeConverterTest.java
index f486452..18cf06a 100644
--- 
a/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextDataJsonAttributeConverterTest.java
+++ 
b/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ContextDataJsonAttributeConverterTest.java
@@ -48,7 +48,7 @@ public class ContextDataJsonAttributeConverterTest {
 
         assertNotNull("The converted value should not be null.", converted);
 
-        final ContextData reversed = (ContextData) 
this.converter.convertToEntityAttribute(converted);
+        final ContextData reversed = 
this.converter.convertToEntityAttribute(converted);
 
         assertNotNull("The reversed value should not be null.", reversed);
         assertEquals("The reversed value is not correct.", map, reversed);
@@ -65,7 +65,7 @@ public class ContextDataJsonAttributeConverterTest {
 
         assertNotNull("The converted value should not be null.", converted);
 
-        final ContextData reversed = (ContextData) 
this.converter.convertToEntityAttribute(converted);
+        final ContextData reversed = 
this.converter.convertToEntityAttribute(converted);
 
         assertNotNull("The reversed value should not be null.", reversed);
         assertEquals("The reversed value is not correct.", map, reversed);

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1d94c3d2/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java
----------------------------------------------------------------------
diff --git 
a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java
 
b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java
index 57baee5..831c4f8 100644
--- 
a/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java
+++ 
b/log4j-perf/src/main/java/org/apache/logging/log4j/perf/jmh/ThreadLocalVsPoolBenchmark.java
@@ -81,7 +81,7 @@ public class ThreadLocalVsPoolBenchmark {
         final Configuration config = new DefaultConfiguration();
         final PatternParser parser = new PatternParser(config, "Converter", 
LogEventPatternConverter.class);
         final List<PatternFormatter> result = parser.parse(LOG4JPATTERN, 
false, true);
-        return (PatternFormatter[]) result.toArray(new 
PatternFormatter[result.size()]);
+        return result.toArray(new PatternFormatter[result.size()]);
     }
 
     @Benchmark

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/1d94c3d2/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 a6a0c9e..8cf953d 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
@@ -232,7 +232,7 @@ public class OpenHashMapContextData<K, V> implements 
MutableContextData, ThreadC
     }
 
     private void tryCapacity(final long capacity) {
-        final int needed = (int) Math.min(
+        final int needed = Math.min(
                 1 << 30, Math.max(2, HashCommon.nextPowerOfTwo((int) 
Math.ceil(capacity / loadFactor))));
         if (needed > arraySize) {
             rehash(needed);
@@ -276,7 +276,7 @@ public class OpenHashMapContextData<K, V> implements 
MutableContextData, ThreadC
 
     @Override
     public boolean containsKey(final String key) {
-        return containsObjectKey((Object) key);
+        return containsObjectKey(key);
     }
 
     @SuppressWarnings("unchecked")
@@ -437,7 +437,7 @@ public class OpenHashMapContextData<K, V> implements 
MutableContextData, ThreadC
 
     @Override
     public <VAL> VAL getValue(final String key) {
-        return (VAL) getObjectValue((Object) key);
+        return (VAL) getObjectValue(key);
     }
 
     @Override
@@ -529,7 +529,7 @@ public class OpenHashMapContextData<K, V> implements 
MutableContextData, ThreadC
 
     @Override
     public void remove(final String key) {
-        removeObjectKey((Object) key);
+        removeObjectKey(key);
     }
 
     @Override

Reply via email to