You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[services-geojson] NullPointerException in Feature.addXxxProperty() or getXxxProperty() methods #1527
All methods like addStringProperty(), addNumberProperty(), getStringProperty()… don’t guard against a null properties field.
The “guard” is at a higher level, as using Feature static factory methods ensure that the properties field is never null.
However Feature.GsonTypeAdapter.read() directly calls the Feature constructor which doesn’t prevent a null properties field. So for example, if someone calls FeatureCollection.fromJson() which contains a feature that has a null properties field, it will be decoded by the GsonAdapter and then calling addStringProperty() on this feature will crash.
changed the title [-]NullPointerException in Feature.addXxxProperty() or getXxxProperty() methods [/-][+][services-geojson] NullPointerException in Feature.addXxxProperty() or getXxxProperty() methods [/+]on Jan 10, 2023
Activity
[-]NullPointerException in Feature.addXxxProperty() or getXxxProperty() methods [/-][+][services-geojson] NullPointerException in Feature.addXxxProperty() or getXxxProperty() methods [/+]