diff --git a/CHANGELOG.md b/CHANGELOG.md index ded5b5c7..a4bb0a8f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ Changelog * fix some invalid filters in the default swagger examples ([#111]) * fix returning invalid GeoJSON using empty coordinates for deletion contributions ([#129], [#131]) * fix using a proper boolean data type instead of a string for contributionType in response ([#135]) -* fix NPE with createOSMFeature ([#141]) +* fix a null pointer exception in data extraction requests ([#141], [#145]) * make sure geometry filters are applied to all returned features of elementsFullHistory requests ([#109]) ### Performance and Code Quality @@ -37,6 +37,7 @@ Changelog [#135]: https://github.com/GIScience/ohsome-api/pull/135 [#138]: https://github.com/GIScience/ohsome-api/issues/138 [#141]: https://github.com/GIScience/ohsome-api/issues/141 +[#145]: https://github.com/GIScience/ohsome-api/pull/145 ## 1.3.2 diff --git a/src/main/lombok/org/heigit/ohsome/ohsomeapi/executor/DataExtractionTransformer.java b/src/main/lombok/org/heigit/ohsome/ohsomeapi/executor/DataExtractionTransformer.java index 39e4d1ba..12412774 100644 --- a/src/main/lombok/org/heigit/ohsome/ohsomeapi/executor/DataExtractionTransformer.java +++ b/src/main/lombok/org/heigit/ohsome/ohsomeapi/executor/DataExtractionTransformer.java @@ -2,6 +2,7 @@ import java.io.Serializable; import java.util.Collections; +import java.util.EnumSet; import java.util.LinkedList; import java.util.List; import java.util.Map; @@ -173,9 +174,9 @@ public List buildUnchangedFeatures(OSMEntitySnapshot snapshot) { properties.put("@validTo", endTimestamp); boolean addToOutput = addEntityToOutput(entity, geom); if (addToOutput) { - return Collections.singletonList( - exeUtils.createOSMFeature(entity, geom, properties, keysInt, includeTags, - includeOSMMetadata, isContributionsEndpoint, elementsGeometry, null)); + return Collections.singletonList(exeUtils.createOSMFeature(entity, geom, properties, + keysInt, includeTags, includeOSMMetadata, isContributionsEndpoint, elementsGeometry, + EnumSet.noneOf(ContributionType.class))); } else { return Collections.emptyList(); }