From: Adam Wagner Date: Fri, 27 Jan 2017 08:59:24 +0000 (+0200) Subject: Improve Grid extendability (#8343) X-Git-Tag: 7.7.7~10 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=870a4d9ab386de41b0c5e344d16ebfd9c13b2951;p=vaadin-framework.git Improve Grid extendability (#8343) * Improve Grid extendability (#8342). Find GridState field type using getField() instead of getDeclaredField() so that the field could be found in superclass as well. Change-Id: I33996f45e848575d11bb206c6a1d30d19e514968 --- diff --git a/server/src/main/java/com/vaadin/ui/Grid.java b/server/src/main/java/com/vaadin/ui/Grid.java index 9bd0c299ee..1efc091104 100644 --- a/server/src/main/java/com/vaadin/ui/Grid.java +++ b/server/src/main/java/com/vaadin/ui/Grid.java @@ -4723,7 +4723,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, Type type = null; try { type = (getState(false).getClass() - .getDeclaredField(diffStateKey) + .getField(diffStateKey) .getGenericType()); } catch (NoSuchFieldException e) { e.printStackTrace(); @@ -4764,7 +4764,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, Type type = null; try { type = (getState(false).getClass() - .getDeclaredField(diffStateKey) + .getField(diffStateKey) .getGenericType()); } catch (NoSuchFieldException e) { e.printStackTrace();