From 00ccbb6281e5ad98aca105a8b96684e30acc5c10 Mon Sep 17 00:00:00 2001 From: Johannes Dahlström Date: Thu, 9 Apr 2015 17:15:48 +0300 Subject: 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 --- server/tests/src/com/vaadin/tests/design/DeclarativeTestBase.java | 4 ++++ 1 file changed, 4 insertions(+) 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 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 -- cgit v1.2.3