logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgo...@apache.org
Subject svn commit: r1431525 - /logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
Date Thu, 10 Jan 2013 17:46:31 GMT
Author: rgoers
Date: Thu Jan 10 17:46:31 2013
New Revision: 1431525

URL: http://svn.apache.org/viewvc?rev=1431525&view=rev
Log:
Revert change to remove "unnecessary" cast. Compile fails on OS/X in Java 7 without it.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java?rev=1431525&r1=1431524&r2=1431525&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
Thu Jan 10 17:46:31 2013
@@ -276,7 +276,8 @@ public class ResolverUtil<T> {
     }
 
     private void loadImplementationsInBundle(final Test test, final String packageName) {
-        final BundleWiring wiring = FrameworkUtil.getBundle(ResolverUtil.class).adapt(BundleWiring.class);
+        //Do not remove the cast on the next line as removing it will cause a compile error
on Java 7.
+        final BundleWiring wiring = (BundleWiring)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);



Mime
View raw message