commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1417103 - in /commons/proper/email/trunk/src/test/java/org/apache/commons/mail: BaseEmailTestCase.java ImageHtmlEmailTest.java
Date Tue, 04 Dec 2012 18:37:20 GMT
Author: sebb
Date: Tue Dec  4 18:37:19 2012
New Revision: 1417103

URL: http://svn.apache.org/viewvc?rev=1417103&view=rev
Log:
Unnecessary casts

Modified:
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/BaseEmailTestCase.java
    commons/proper/email/trunk/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/BaseEmailTestCase.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/BaseEmailTestCase.java?rev=1417103&r1=1417102&r2=1417103&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/BaseEmailTestCase.java
(original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/BaseEmailTestCase.java
Tue Dec  4 18:37:19 2012
@@ -240,7 +240,7 @@ public abstract class BaseEmailTestCase 
     {
         assertTrue("mail server doesn't contain expected message",
                 mailServer.getMessages().size() == 1);
-        WiserMessage emailMessage = (WiserMessage) mailServer.getMessages().get(0);
+        WiserMessage emailMessage = mailServer.getMessages().get(0);
 
         if (boolSaveToFile)
         {

Modified: commons/proper/email/trunk/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
URL: http://svn.apache.org/viewvc/commons/proper/email/trunk/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java?rev=1417103&r1=1417102&r2=1417103&view=diff
==============================================================================
--- commons/proper/email/trunk/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
(original)
+++ commons/proper/email/trunk/src/test/java/org/apache/commons/mail/ImageHtmlEmailTest.java
Tue Dec  4 18:37:19 2012
@@ -93,7 +93,7 @@ public class ImageHtmlEmailTest extends 
         fakeMailServer.stop();
 
         assertEquals(1, fakeMailServer.getMessages().size());
-        MimeMessage mimeMessage = ((WiserMessage) fakeMailServer.getMessages().get(0)).getMimeMessage();
+        MimeMessage mimeMessage = fakeMailServer.getMessages().get(0).getMimeMessage();
 
         MimeMessageParser mimeMessageParser = new MimeMessageParser(mimeMessage).parse();
         assertTrue(mimeMessageParser.getHtmlContent().indexOf("\"cid:") >= 0);
@@ -230,7 +230,7 @@ public class ImageHtmlEmailTest extends 
         fakeMailServer.stop();
 
         assertEquals(1, fakeMailServer.getMessages().size());
-        MimeMessage mimeMessage = ((WiserMessage) fakeMailServer.getMessages().get(0)).getMimeMessage();
+        MimeMessage mimeMessage = fakeMailServer.getMessages().get(0).getMimeMessage();
         MimeMessageUtils.writeMimeMessage(mimeMessage, new File("./target/test-emails/testSendHTMLClassPathFile.eml"));
 
         MimeMessageParser mimeMessageParser = new MimeMessageParser(mimeMessage).parse();
@@ -272,7 +272,7 @@ public class ImageHtmlEmailTest extends 
         fakeMailServer.stop();
 
         assertEquals(1, fakeMailServer.getMessages().size());
-        MimeMessage mimeMessage = ((WiserMessage) fakeMailServer.getMessages().get(0)).getMimeMessage();
+        MimeMessage mimeMessage = fakeMailServer.getMessages().get(0).getMimeMessage();
         MimeMessageUtils.writeMimeMessage(mimeMessage, new File("./target/test-emails/testSendHTMLAutoFile.eml"));
 
         MimeMessageParser mimeMessageParser = new MimeMessageParser(mimeMessage).parse();



Mime
View raw message