You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2015/09/14 23:04:34 UTC

logging-log4j2 git commit: Compiles without type casts on Java version: 1.7.0_79, vendor: Oracle Corporation and Maven 3.2.5.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 55785c482 -> e6b629579


Compiles without type casts on Java version: 1.7.0_79, vendor: Oracle
Corporation and Maven 3.2.5.

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

Branch: refs/heads/master
Commit: e6b629579376b73b237e879f15f353319ed4e618
Parents: 55785c4
Author: ggregory <gg...@apache.org>
Authored: Mon Sep 14 14:04:31 2015 -0700
Committer: ggregory <gg...@apache.org>
Committed: Mon Sep 14 14:04:31 2015 -0700

----------------------------------------------------------------------
 .../logging/log4j/core/config/plugins/util/ResolverUtil.java | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/e6b62957/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
index 8f68179..4197321 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/util/ResolverUtil.java
@@ -247,12 +247,8 @@ public class ResolverUtil {
     }
 
     private void loadImplementationsInBundle(final Test test, final String packageName) {
-        // Do not remove the cast on the next line as removing it will cause a compile error on Java 7.
-        @SuppressWarnings("RedundantCast")
-        final BundleWiring wiring = (BundleWiring) FrameworkUtil.getBundle(ResolverUtil.class)
-                .adapt(BundleWiring.class);
-        @SuppressWarnings("unchecked")
-        final Collection<String> list = (Collection<String>) wiring.listResources(packageName, "*.class",
+        final BundleWiring wiring = FrameworkUtil.getBundle(ResolverUtil.class).adapt(BundleWiring.class);
+        final Collection<String> list = wiring.listResources(packageName, "*.class",
                 BundleWiring.LISTRESOURCES_RECURSE);
         for (final String name : list) {
             addIfMatching(test, name);