7163696: JCK Swing interactive test JScrollBarTest0013 fails with Nimbus and GTK L&Fs
Reviewed-by: alexsch
--- a/jdk/src/share/classes/java/beans/PropertyDescriptor.java Thu Feb 28 20:27:38 2013 +0400
+++ b/jdk/src/share/classes/java/beans/PropertyDescriptor.java Fri Mar 01 14:30:52 2013 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -109,10 +109,6 @@
if (writeMethodName != null && getWriteMethod() == null) {
throw new IntrospectionException("Method not found: " + writeMethodName);
}
- boundInitialization(beanClass);
- }
-
- private void boundInitialization(Class<?> beanClass) {
// If this class or one of its base classes allow PropertyChangeListener,
// then we assume that any properties we discover are "bound".
// See Introspector.getTargetPropertyInfo() method.
@@ -163,7 +159,6 @@
setReadMethod(read);
setWriteMethod(write);
this.baseName = base;
- boundInitialization(bean);
}
/**
--- a/jdk/test/java/beans/Introspector/Test7192955.java Thu Feb 28 20:27:38 2013 +0400
+++ b/jdk/test/java/beans/Introspector/Test7192955.java Fri Mar 01 14:30:52 2013 +0400
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,17 +23,20 @@
/*
* @test
- * @bug 7192955
+ * @bug 7192955 8000183
* @summary Tests that all properties are bound
* @author Sergey Malenkov
*/
+import java.beans.IntrospectionException;
+import java.beans.Introspector;
import java.beans.PropertyChangeListener;
+import java.beans.PropertyDescriptor;
import java.util.List;
public class Test7192955 {
- public static void main(String[] args) {
+ public static void main(String[] args) throws IntrospectionException {
if (!BeanUtils.findPropertyDescriptor(MyBean.class, "test").isBound()) {
throw new Error("a simple property is not bound");
}
@@ -43,6 +46,12 @@
if (!BeanUtils.findPropertyDescriptor(MyBean.class, "readOnly").isBound()) {
throw new Error("a read-only property is not bound");
}
+ PropertyDescriptor[] pds = Introspector.getBeanInfo(MyBean.class, BaseBean.class).getPropertyDescriptors();
+ for (PropertyDescriptor pd : pds) {
+ if (pd.getName().equals("test") && pd.isBound()) {
+ throw new Error("a simple property is bound without superclass");
+ }
+ }
}
public static class BaseBean {