7163696: JCK Swing interactive test JScrollBarTest0013 fails with Nimbus and GTK L&Fs
Reviewed-by: alexsch
This commit is contained in:
parent
1270c69088
commit
19bc54290f
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -109,10 +109,6 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
|||||||
if (writeMethodName != null && getWriteMethod() == null) {
|
if (writeMethodName != null && getWriteMethod() == null) {
|
||||||
throw new IntrospectionException("Method not found: " + writeMethodName);
|
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,
|
// If this class or one of its base classes allow PropertyChangeListener,
|
||||||
// then we assume that any properties we discover are "bound".
|
// then we assume that any properties we discover are "bound".
|
||||||
// See Introspector.getTargetPropertyInfo() method.
|
// See Introspector.getTargetPropertyInfo() method.
|
||||||
@ -163,7 +159,6 @@ public class PropertyDescriptor extends FeatureDescriptor {
|
|||||||
setReadMethod(read);
|
setReadMethod(read);
|
||||||
setWriteMethod(write);
|
setWriteMethod(write);
|
||||||
this.baseName = base;
|
this.baseName = base;
|
||||||
boundInitialization(bean);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -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.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@ -23,17 +23,20 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* @test
|
* @test
|
||||||
* @bug 7192955
|
* @bug 7192955 8000183
|
||||||
* @summary Tests that all properties are bound
|
* @summary Tests that all properties are bound
|
||||||
* @author Sergey Malenkov
|
* @author Sergey Malenkov
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import java.beans.IntrospectionException;
|
||||||
|
import java.beans.Introspector;
|
||||||
import java.beans.PropertyChangeListener;
|
import java.beans.PropertyChangeListener;
|
||||||
|
import java.beans.PropertyDescriptor;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public class Test7192955 {
|
public class Test7192955 {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) throws IntrospectionException {
|
||||||
if (!BeanUtils.findPropertyDescriptor(MyBean.class, "test").isBound()) {
|
if (!BeanUtils.findPropertyDescriptor(MyBean.class, "test").isBound()) {
|
||||||
throw new Error("a simple property is not bound");
|
throw new Error("a simple property is not bound");
|
||||||
}
|
}
|
||||||
@ -43,6 +46,12 @@ public class Test7192955 {
|
|||||||
if (!BeanUtils.findPropertyDescriptor(MyBean.class, "readOnly").isBound()) {
|
if (!BeanUtils.findPropertyDescriptor(MyBean.class, "readOnly").isBound()) {
|
||||||
throw new Error("a read-only property is not bound");
|
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 {
|
public static class BaseBean {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user