]> source.dussan.org Git - vaadin-framework.git/commitdiff
Improve Grid extendability (#8343)
authorAdam Wagner <wbadam@users.noreply.github.com>
Fri, 27 Jan 2017 08:59:24 +0000 (10:59 +0200)
committerDenis <denis@vaadin.com>
Fri, 27 Jan 2017 08:59:24 +0000 (10:59 +0200)
* 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

server/src/main/java/com/vaadin/ui/Grid.java

index 9bd0c299ee96df2d3a276561d50302a38fc03df1..1efc09110437b3347324d5ddd4081ea032e44dad 100644 (file)
@@ -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();