logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1431434 - in /logging/log4j/log4j2/trunk: core/src/main/java/org/apache/logging/log4j/core/config/plugins/ core/src/main/java/org/apache/logging/log4j/core/net/ log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/ log4j12-api/src/test/ja...
Date Thu, 10 Jan 2013 15:34:40 GMT
Author: ggregory
Date: Thu Jan 10 15:34:39 2013
New Revision: 1431434

URL: http://svn.apache.org/viewvc?rev=1431434&view=rev
Log:
Remove unnecessary casts.

Modified:
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
    logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
    logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java
    logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.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=1431434&r1=1431433&r2=1431434&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 15:34:39 2013
@@ -276,7 +276,7 @@ public class ResolverUtil<T> {
     }
 
     private void loadImplementationsInBundle(final Test test, final String packageName) {
-        final BundleWiring wiring = (BundleWiring)FrameworkUtil.getBundle(ResolverUtil.class).adapt(BundleWiring.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);

Modified: logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java?rev=1431434&r1=1431433&r2=1431434&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
(original)
+++ logging/log4j/log4j2/trunk/core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
Thu Jan 10 15:34:39 2013
@@ -117,7 +117,7 @@ public class SMTPManager extends Abstrac
 
         String name = "SMTP:" + NameUtil.md5(sb.toString());
 
-        return (SMTPManager) getManager(name, factory, new FactoryData(to, cc, bcc, from,
replyTo, subject,
+        return getManager(name, factory, new FactoryData(to, cc, bcc, from, replyTo, subject,
             protocol, host, port, username, password, isDebug, numElements));
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java?rev=1431434&r1=1431433&r2=1431434&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-to-slf4j/src/test/java/org/apache/logging/slf4j/LoggerTest.java
Thu Jan 10 15:34:39 2013
@@ -133,10 +133,10 @@ public class LoggerTest {
     }
 
     private Logger testMessageFactoryMismatch(final String name, final MessageFactory messageFactory1,
final MessageFactory messageFactory2) {
-        final Logger testLogger = (Logger) LogManager.getLogger(name, messageFactory1);
+        final Logger testLogger = LogManager.getLogger(name, messageFactory1);
         assertNotNull(testLogger);
         assertEquals(messageFactory1, testLogger.getMessageFactory());
-        final Logger testLogger2 = (Logger) LogManager.getLogger(name, messageFactory2);
+        final Logger testLogger2 = LogManager.getLogger(name, messageFactory2);
         assertEquals(messageFactory1, testLogger2.getMessageFactory());
         return testLogger;
     }

Modified: logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java?rev=1431434&r1=1431433&r2=1431434&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j12-api/src/test/java/org/apache/log4j/LoggerTest.java
Thu Jan 10 15:34:39 2013
@@ -406,7 +406,7 @@ public class LoggerTest {
 
         final List<LogEvent> msgs = appender.getEvents();
         assertEquals(1, msgs.size());
-        final LogEvent event = (LogEvent) msgs.get(0);
+        final LogEvent event = msgs.get(0);
         assertEquals(org.apache.logging.log4j.Level.TRACE, event.getLevel());
         assertEquals("Message 1", event.getMessage().getFormat());
         appender.stop();



Mime
View raw message