From e9e1f27be4b5d2fa0026b06c0d7f688d7a8d1842 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Tue, 8 Sep 2009 14:08:59 +0400 Subject: [PATCH] 6868185: 2 JCK api/java_beans/Introspector/ tests fails starting from jdk7 b66 Reviewed-by: peterz --- .../com/sun/beans/finder/BeanInfoFinder.java | 20 ++++++++----------- 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java index faab85cafa9..5dda4dfa1a3 100644 --- a/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java +++ b/jdk/src/share/classes/com/sun/beans/finder/BeanInfoFinder.java @@ -52,8 +52,14 @@ public final class BeanInfoFinder } @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 @@ public final class BeanInfoFinder } 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; - } }