diff options
Diffstat (limited to 'server/src/com/vaadin/terminal')
-rw-r--r-- | server/src/com/vaadin/terminal/AbstractClientConnector.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/server/src/com/vaadin/terminal/AbstractClientConnector.java b/server/src/com/vaadin/terminal/AbstractClientConnector.java index a8da553a62..1025297a4f 100644 --- a/server/src/com/vaadin/terminal/AbstractClientConnector.java +++ b/server/src/com/vaadin/terminal/AbstractClientConnector.java @@ -187,7 +187,16 @@ public abstract class AbstractClientConnector implements ClientConnector { @Override public Class<? extends SharedState> getStateType() { try { - Method m = getClass().getMethod("getState", (Class[]) null); + Method m = null; + Class<?> class1 = getClass(); + while (m == null && class1 != null) { + m = class1.getDeclaredMethod("getState", (Class[]) null); + class1 = class1.getSuperclass(); + } + if (m == null) { + throw new NoSuchMethodException(getClass().getCanonicalName() + + ".getState()"); + } Class<?> type = m.getReturnType(); return type.asSubclass(SharedState.class); } catch (Exception e) { |