Author: grobmeier
Date: Sun Oct  9 05:46:51 2011
New Revision: 1180548

URL: http://svn.apache.org/viewvc?rev=1180548&view=rev
Log:
a test case should not print out to console

Modified:
    
commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java

Modified: 
commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
URL: 
http://svn.apache.org/viewvc/commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java?rev=1180548&r1=1180547&r2=1180548&view=diff
==============================================================================
--- 
commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
 (original)
+++ 
commons/proper/ognl/trunk/src/test/java/org/apache/commons/ognl/test/OgnlTestCase.java
 Sun Oct  9 05:46:51 2011
@@ -197,18 +197,16 @@ public abstract class OgnlTestCase
             }
 
         } catch (Exception ex) {
-            System.out.println("Caught exception " + ex);
-            if (NullPointerException.class.isInstance(ex))
-                ex.printStackTrace();
-
             if (RuntimeException.class.isInstance(ex) && ex.getCause() != null
-                    && Exception.class.isAssignableFrom( 
ex.getCause().getClass()))
-                ex = (Exception) ((RuntimeException) ex).getCause();
+                    && Exception.class.isAssignableFrom( 
ex.getCause().getClass())) {
+               ex = (Exception) ((RuntimeException) ex).getCause();
+            }
 
             if (testedResult instanceof Class) {
                 Assert.assertTrue(Exception.class.isAssignableFrom((Class) 
testedResult));
-            } else
-                throw ex;
+            } else {
+               throw ex;
+            }
         }
     }
 


Reply via email to