You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by te...@apache.org on 2006/06/08 07:19:30 UTC

svn commit: r412663 - /incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/AuthenticatorTest.java

Author: tellison
Date: Wed Jun  7 22:19:29 2006
New Revision: 412663

URL: http://svn.apache.org/viewvc?rev=412663&view=rev
Log:
Make enum test tollerant of different compiler idioms.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/AuthenticatorTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/AuthenticatorTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/AuthenticatorTest.java?rev=412663&r1=412662&r2=412663&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/AuthenticatorTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/AuthenticatorTest.java Wed Jun  7 22:19:29 2006
@@ -40,13 +40,15 @@
         } catch (IllegalArgumentException e) {
             // correct
         }
-        // Some old RIs,which throw IllegalArgumentException, will fail 
-		// this test case. Latest RIs throw NullPointerException.
+        // Some old RIs throw IllegalArgumentException 
+		// Latest RIs throw NullPointerException.
         try {
-            RequestorType rt = Authenticator.RequestorType.valueOf(null);
-            fail("Must throw NullPointerException");
+            Authenticator.RequestorType.valueOf(null);
+            fail("Must throw an exception");
         } catch (NullPointerException e) {
-            // correct
+            // May be caused by some compilers' code
+        } catch (IllegalArgumentException e) {
+            // other compilers will throw this
         }
     }