You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2010/11/13 00:11:30 UTC

svn commit: r1034598 - /axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentSerializationTest.java

Author: veithen
Date: Fri Nov 12 23:11:30 2010
New Revision: 1034598

URL: http://svn.apache.org/viewvc?rev=1034598&view=rev
Log:
Eliminated an instance of the catch-and-fail JUnit antipattern.

Modified:
    axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentSerializationTest.java

Modified: axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentSerializationTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentSerializationTest.java?rev=1034598&r1=1034597&r2=1034598&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentSerializationTest.java (original)
+++ axis/axis2/java/core/trunk/modules/saaj/test/org/apache/axis2/saaj/AttachmentSerializationTest.java Fri Nov 12 23:11:30 2010
@@ -53,14 +53,9 @@ public class AttachmentSerializationTest
 
     @Validated @Test
     public void testAttachments() throws Exception {
-        try {
-            ByteArrayOutputStream bais = new ByteArrayOutputStream();
-            int count = saveMsgWithAttachments(bais);
-            assertEquals(count, 2);
-        } catch (Exception e) {
-            e.printStackTrace();
-            fail("Unexpected Exception : " + e);
-        }
+        ByteArrayOutputStream bais = new ByteArrayOutputStream();
+        int count = saveMsgWithAttachments(bais);
+        assertEquals(count, 2);
     }
 
     public int saveMsgWithAttachments(OutputStream os) throws Exception {