From 48751b16ec90d00cc08eb851d3c83843850a9cf0 Mon Sep 17 00:00:00 2001 From: Taylor Smock Date: Tue, 28 Jun 2022 12:40:44 -0600 Subject: [PATCH] ESRISourceReader: Account for `null` values for "accessInformation" Signed-off-by: Taylor Smock --- .../josm/plugins/mapwithai/io/mapwithai/ESRISourceReader.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/ESRISourceReader.java b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/ESRISourceReader.java index 0170b3f..a8f94f1 100644 --- a/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/ESRISourceReader.java +++ b/src/main/java/org/openstreetmap/josm/plugins/mapwithai/io/mapwithai/ESRISourceReader.java @@ -181,7 +181,8 @@ public class ESRISourceReader { if (this.ignoreConflationCategories.contains(newInfo.getCategory())) { newInfo.setConflation(false); } - if (feature.containsKey("accessInformation")) { + if (feature.containsKey("accessInformation") + && feature.get("accessInformation").getValueType() != JsonValue.ValueType.NULL) { newInfo.setAttributionText(feature.getString("accessInformation")); } newInfo.setDescription(feature.getString("snippet"));