harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r439299 - in /incubator/harmony/enhanced/classlib/trunk/modules/auth/src: main/java/common/javax/security/auth/callback/ConfirmationCallback.java test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java
Date Fri, 01 Sep 2006 12:49:23 GMT
Author: hindessm
Date: Fri Sep  1 05:49:22 2006
New Revision: 439299

URL: http://svn.apache.org/viewvc?rev=439299&view=rev
Log:
Fixing logic error and adding trivial regression test.

Modified:
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/callback/ConfirmationCallback.java
    incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/callback/ConfirmationCallback.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/callback/ConfirmationCallback.java?rev=439299&r1=439298&r2=439299&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/callback/ConfirmationCallback.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/main/java/common/javax/security/auth/callback/ConfirmationCallback.java
Fri Sep  1 05:49:22 2006
@@ -312,7 +312,7 @@
         } else {
             switch (optionType) {
             case YES_NO_OPTION:
-                if (selection == YES || selection != NO) {
+                if (selection != YES && selection != NO) {
                     throw new IllegalArgumentException("invalid selection");
                 }
                 break;

Modified: incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java?rev=439299&r1=439298&r2=439299&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java
(original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/auth/src/test/java/common/javax/security/auth/callback/ConfirmationCallbackTest.java
Fri Sep  1 05:49:22 2006
@@ -272,4 +272,12 @@
         } catch (ArrayIndexOutOfBoundsException e){}
         
     }
+
+    /*
+     * Regression test for bug in setSelectedIndex
+     */
+    public final void testSetSelectedIndex() throws Exception {
+        cc = new ConfirmationCallback("prompt", mt[0], ot[0], dopt[0]);
+        cc.setSelectedIndex(ConfirmationCallback.YES);
+    }
 }



Mime
View raw message