diff --git a/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java b/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java index 1b67f6a8e..a7896cb0e 100644 --- a/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java +++ b/cygnus-common/src/main/java/com/telefonica/iot/cygnus/backends/arcgis/restutils/ArcgisFeatureTable.java @@ -381,13 +381,18 @@ protected void splitFeatureListIfExists(List featureArray, for (Feature feature : featureArray) { boolean found = false; - String featureId = feature.getAttributes().get(uniqueField).toString(); + String featureId = null; + if (feature.getAttributes().containsKey(uniqueField)) { + featureId = feature.getAttributes().get(uniqueField).toString(); + } int i = 0; while (!found && i < serverFeatures.size()) { Feature serverFeature = serverFeatures.get(i); - String serverFeatureId = serverFeature.getAttributes().get(uniqueField).toString(); - + String serverFeatureId = null; + if ( serverFeature.getAttributes().containsKey(uniqueField)) { + serverFeatureId = serverFeature.getAttributes().get(uniqueField).toString(); + } if (featureId.equalsIgnoreCase(serverFeatureId)) { found = true; Integer oid = serverFeature.getObjectId();