Browse Source

Do not consider compiler introduced methods when determining state class (#14003)

Change-Id: Ia2c3b8331f1ae34effceb0bb624cfaa7ba8578ed
tags/7.3.0.beta1
Artur Signell 10 years ago
parent
commit
54329d37c8
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      server/src/com/vaadin/server/AbstractClientConnector.java

+ 5
- 3
server/src/com/vaadin/server/AbstractClientConnector.java View File

@@ -292,11 +292,13 @@ public abstract class AbstractClientConnector implements ClientConnector,
Method m = class1.getDeclaredMethod("getState",
(Class[]) null);
Class<?> type = m.getReturnType();
return type.asSubclass(SharedState.class);
if (!m.isSynthetic()) {
return type.asSubclass(SharedState.class);
}
} catch (NoSuchMethodException nsme) {
// Try in superclass instead
class1 = class1.getSuperclass();
}
// Try in superclass instead
class1 = class1.getSuperclass();
}
throw new NoSuchMethodException(getClass().getCanonicalName()
+ ".getState()");

Loading…
Cancel
Save