提交 a3d57685 编写于 作者: M malenkov

6868185: 2 JCK api/java_beans/Introspector/ tests fails starting from jdk7 b66

Reviewed-by: peterz
上级 4919e75a
...@@ -52,8 +52,14 @@ public final class BeanInfoFinder ...@@ -52,8 +52,14 @@ public final class BeanInfoFinder
} }
@Override @Override
protected BeanInfo instantiate(Class<?> type, String name) { protected BeanInfo instantiate(Class<?> type, String prefix, String name) {
BeanInfo info = super.instantiate(type, 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) { if (info != null) {
// make sure that the returned BeanInfo matches the class // make sure that the returned BeanInfo matches the class
BeanDescriptor bd = info.getBeanDescriptor(); BeanDescriptor bd = info.getBeanDescriptor();
...@@ -89,14 +95,4 @@ public final class BeanInfoFinder ...@@ -89,14 +95,4 @@ public final class BeanInfoFinder
} }
return null; 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;
}
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册