summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Dahlström <johannesd@vaadin.com>2015-04-09 17:15:48 +0300
committerJohannes Dahlström <johannesd@vaadin.com>2015-04-09 17:15:48 +0300
commit00ccbb6281e5ad98aca105a8b96684e30acc5c10 (patch)
treee3a4bd0e96aeaf9f17cb0ce0b18fb6761897b412
parent8f02bfd384be1276b50b3ef2bfafec7a17523100 (diff)
downloadvaadin-framework-00ccbb6281e5ad98aca105a8b96684e30acc5c10.tar.gz
vaadin-framework-00ccbb6281e5ad98aca105a8b96684e30acc5c10.zip
Fix DeclarativeTestBase handling of nonpublic accessors (#17425)
Bean introspector finds public properties inherited from nonpublic superclasses but their accessor methods are not accessible by default. Change-Id: I3d79f8361c7f9eb9e37d2c7eb7c19965c986cd20
-rw-r--r--server/tests/src/com/vaadin/tests/design/DeclarativeTestBase.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/tests/src/com/vaadin/tests/design/DeclarativeTestBase.java b/server/tests/src/com/vaadin/tests/design/DeclarativeTestBase.java
index 10f1e5c711..7e8b5c7767 100644
--- a/server/tests/src/com/vaadin/tests/design/DeclarativeTestBase.java
+++ b/server/tests/src/com/vaadin/tests/design/DeclarativeTestBase.java
@@ -60,6 +60,10 @@ public abstract class DeclarativeTestBase<T extends Component> extends
if (readMethod == null || writeMethod == null) {
continue;
}
+ // Needed to access public properties inherited from a
+ // nonpublic superclass, see #17425
+ readMethod.setAccessible(true);
+ writeMethod.setAccessible(true);
if (Connector.class.isAssignableFrom(c)
&& readMethod.getName().equals("getParent")) {
// Hack to break cycles in the connector hierarchy