jdk/test/sun/invoke/util/ValueConversionsTest.java
changeset 13610 28122b96858e
parent 13423 17843fff200d
child 14342 8435a30053c1
--- a/jdk/test/sun/invoke/util/ValueConversionsTest.java	Wed Jul 05 18:20:00 2017 +0200
+++ b/jdk/test/sun/invoke/util/ValueConversionsTest.java	Fri Aug 17 13:42:25 2012 -0700
@@ -159,14 +159,8 @@
             assertEquals(caster.type(), ValueConversions.identity().type());
             for (Object obj : objects) {
                 Class<?> src = obj.getClass();
-                boolean canCast;
-                if (dst.isInterface()) {
-                    canCast = true;
-                } else {
-                    canCast = dst.isAssignableFrom(src);
-                    assertEquals(canCast, dst.isInstance(obj));
-                }
-                //System.out.println("obj="+obj+" <: dst="+dst);
+                boolean canCast = dst.isAssignableFrom(src);
+                //System.out.println("obj="+obj+" <: dst="+dst+(canCast ? " (OK)" : " (will fail)"));
                 try {
                     Object result = caster.invokeExact(obj);
                     if (canCast)