6868185: 2 JCK api/java_beans/Introspector/ tests fails starting from jdk7 b66
authormalenkov
Tue, 08 Sep 2009 14:08:59 +0400
changeset 3752 00844200c749
parent 3751 8b0ac086b7c0
child 3753 c0c9b5f2c874
child 3973 3bdd09958faf
6868185: 2 JCK api/java_beans/Introspector/ tests fails starting from jdk7 b66 Reviewed-by: peterz
jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java
--- a/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java	Mon Sep 07 15:09:40 2009 +0400
+++ b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java	Tue Sep 08 14:08:59 2009 +0400
@@ -52,8 +52,14 @@
     }
 
     @Override
-    protected BeanInfo instantiate(Class<?> type, String name) {
-        BeanInfo info = super.instantiate(type, name);
+    protected BeanInfo instantiate(Class<?> type, String prefix, String name) {
+        // this optimization will only use the BeanInfo search path
+        // if is has changed from the original
+        // or trying to get the ComponentBeanInfo
+        BeanInfo info = !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name)
+                ? super.instantiate(type, prefix, name)
+                : null;
+
         if (info != null) {
             // make sure that the returned BeanInfo matches the class
             BeanDescriptor bd = info.getBeanDescriptor();
@@ -89,14 +95,4 @@
         }
         return null;
     }
-
-    @Override
-    protected BeanInfo instantiate(Class<?> type, String prefix, String name) {
-        // this optimization will only use the BeanInfo search path
-        // if is has changed from the original
-        // or trying to get the ComponentBeanInfo
-        return !DEFAULT.equals(prefix) || "ComponentBeanInfo".equals(name)
-                ? super.instantiate(type, prefix, name)
-                : null;
-    }
 }