Author: thobbs
Date: Wed Nov 24 15:33:57 2010
New Revision: 1038648

URL: http://svn.apache.org/viewvc?rev=1038648&view=rev
Log:
Fix to accept sub-classes of exceptions as being acceptable when the super-type 
is given as the expected type.  E.g. If the expected type is IOException, 
UnknownHostException should be acceptable given that UHE extends IOE.  (Based 
on code comment which preceeds the static definition of "tests").

Modified:
    
incubator/river/jtsk/trunk/qa/jtreg/com/sun/jini/config/KeyStores/TestGetKeyStore.java

Modified: 
incubator/river/jtsk/trunk/qa/jtreg/com/sun/jini/config/KeyStores/TestGetKeyStore.java
URL: 
http://svn.apache.org/viewvc/incubator/river/jtsk/trunk/qa/jtreg/com/sun/jini/config/KeyStores/TestGetKeyStore.java?rev=1038648&r1=1038647&r2=1038648&view=diff
==============================================================================
--- 
incubator/river/jtsk/trunk/qa/jtreg/com/sun/jini/config/KeyStores/TestGetKeyStore.java
 (original)
+++ 
incubator/river/jtsk/trunk/qa/jtreg/com/sun/jini/config/KeyStores/TestGetKeyStore.java
 Wed Nov 24 15:33:57 2010
@@ -89,9 +89,9 @@ public class TestGetKeyStore extends Bas
     }
 
     public void check(Object result) {
-       if (result.getClass() != getCompareTo()) {
+       if (result.getClass().isAssignableFrom(getCompareTo().getClass())) {
            throw new FailedException(
-               "Should be of type " + getCompareTo());
+               "Should be of type " + getCompareTo() + " but was 
"+result.getClass());
        }
     }
 


Reply via email to