harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odea...@apache.org
Subject svn commit: r588605 - in /harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module: JndiLoginModuleTest.java KeyStoreLoginModuleTest.java
Date Fri, 26 Oct 2007 11:23:25 GMT
Author: odeakin
Date: Fri Oct 26 04:23:24 2007
New Revision: 588605

URL: http://svn.apache.org/viewvc?rev=588605&view=rev
Log:
Let JUnit deal with unexpected Exceptions rather than catching them ourselves.

Modified:
    harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
    harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java

Modified: harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java?rev=588605&r1=588604&r2=588605&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/JndiLoginModuleTest.java
Fri Oct 26 04:23:24 2007
@@ -72,12 +72,9 @@
         Subject subject = new Subject();
         subject.setReadOnly();
         jlm.initialize(subject, null, null, options);
-        try {
-            assertFalse("Should return false if login failed or no login", jlm
-                    .abort());
-        } catch (Exception e) {
-            fail("Not any exception here");
-        }
+
+        assertFalse("Should return false if login failed or no login", jlm.abort());
+
         subject = new Subject();
         jlm.initialize(subject, new FaultCallbackHandler(), null, options);
         try {

Modified: harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java?rev=588605&r1=588604&r2=588605&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/org/apache/harmony/auth/tests/module/KeyStoreLoginModuleTest.java
Fri Oct 26 04:23:24 2007
@@ -57,12 +57,9 @@
         Subject subject = new Subject();
         subject.setReadOnly();
         ksm.initialize(subject, null, null, options);
-        try {
-            assertFalse("Should return false if login failed or no login", ksm
-                    .abort());
-        } catch (Exception e) {
-            fail("Not any exception here");
-        }
+
+        assertFalse("Should return false if login failed or no login", ksm.abort());
+
         options.remove("keyStorePasswordURL");
         options.put("keyStorePasswordURL", KEYSTORE_FAULTPASSWORD_URL);
         subject = new Subject();



Mime
View raw message