FlowingCode / GridHelpers

Several grid recipes for Vaadin 23+ (and 22), ready to use. DOES NOT require extending Grid.
https://addonsv23.flowingcode.com/grid-helpers
Apache License 2.0
12 stars 1 forks source link

Trying to obtain a footer on a grid that has no footer throws NPE #31

Closed mlopezFC closed 2 years ago

mlopezFC commented 2 years ago

Given that footers are optional it would be great to return null instead of throwing the following NPE:

Caused by: java.lang.NullPointerException
    at jdk.internal.reflect.UnsafeFieldAccessorImpl.ensureObj (UnsafeFieldAccessorImpl.java:57)
    at jdk.internal.reflect.UnsafeObjectFieldAccessorImpl.get (UnsafeObjectFieldAccessorImpl.java:36)
    at java.lang.reflect.Field.get (Field.java:418)
    at com.flowingcode.vaadin.addons.gridhelpers.HeaderFooterGridHelper.getTemplate (HeaderFooterGridHelper.java:22)
    at com.flowingcode.vaadin.addons.gridhelpers.HeaderFooterGridHelper.getFooter (HeaderFooterGridHelper.java:64)
    at com.flowingcode.vaadin.addons.gridhelpers.GridHelper.getFooter (GridHelper.java:308)