logging-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1566189 - in /logging/log4j/log4j2/trunk/log4j-core/src: main/java/org/apache/logging/log4j/core/appender/ test/java/org/apache/logging/log4j/core/appender/
Date Sun, 09 Feb 2014 03:04:25 GMT
Author: ggregory
Date: Sun Feb  9 03:04:23 2014
New Revision: 1566189

URL: http://svn.apache.org/r1566189
Log:
Remove unnecessary casts.

Modified:
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java
    logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
    logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java?rev=1566189&r1=1566188&r2=1566189&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RandomAccessFileAppender.java
Sun Feb  9 03:04:23 2014
@@ -82,7 +82,7 @@ public final class RandomAccessFileAppen
         // From a user's point of view, this means that all log events are
         // _always_ available in the log file, without incurring the overhead
         // of immediateFlush=true.
-        ((RandomAccessFileManager) getManager()).setEndOfBatch(event.isEndOfBatch());
+        getManager().setEndOfBatch(event.isEndOfBatch());
         super.append(event);
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java?rev=1566189&r1=1566188&r2=1566189&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/RollingFileAppender.java
Sun Feb  9 03:04:23 2014
@@ -81,7 +81,7 @@ public final class RollingFileAppender e
      */
     @Override
     public void append(final LogEvent event) {
-        ((RollingFileManager) getManager()).checkRollover(event);
+        getManager().checkRollover(event);
         super.append(event);
     }
 

Modified: logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java?rev=1566189&r1=1566188&r2=1566189&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java
(original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/SMTPAppenderTest.java
Sun Feb  9 03:04:23 2014
@@ -175,7 +175,7 @@ public class SMTPAppenderTest {
         assertTrue(body.contains("Exception message"));
         assertFalse(body.contains("Error message #2"));
 
-        final SmtpMessage email2 = (SmtpMessage) messages.next();
+        final SmtpMessage email2 = messages.next();
         final String body2 = email2.getBody();
         assertFalse(body2.contains("Debug message #4"));
         assertFalse(body2.contains("Error with exception"));



Mime
View raw message