diff --git a/CHANGES_NEXT_RELEASE b/CHANGES_NEXT_RELEASE index a1afb8ff7..6fec658b3 100644 --- a/CHANGES_NEXT_RELEASE +++ b/CHANGES_NEXT_RELEASE @@ -1,3 +1,4 @@ +- [cygnus-ngsi] Fix runtime error: check access aggregator size (#2293) - [cygnus-ngsi] Switch log level to CYGNUS_LOG_LEVEL env var if was provided to docker (#2286) - [cygnus-common][SQL] Fix expiration records tablename used by delete and select (#2265) - [cygnus-common][SQL] Fix expiration records select with a limit to avoid java out of memory error (#2273) diff --git a/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/aggregation/NGSIGenericColumnAggregator.java b/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/aggregation/NGSIGenericColumnAggregator.java index 06086cb70..5e75c49ea 100644 --- a/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/aggregation/NGSIGenericColumnAggregator.java +++ b/cygnus-ngsi/src/main/java/com/telefonica/iot/cygnus/aggregation/NGSIGenericColumnAggregator.java @@ -98,7 +98,10 @@ public void initialize(NGSIEvent event) { @Override public void aggregate(NGSIEvent event) { // Number of previous values - int numPreviousValues = getAggregation().get(NGSIConstants.FIWARE_SERVICE_PATH).size(); + int numPreviousValues = 0; + if (getAggregation().get(NGSIConstants.FIWARE_SERVICE_PATH) != null) { + numPreviousValues = getAggregation().get(NGSIConstants.FIWARE_SERVICE_PATH).size(); + } // get the servicePath from event String eventServicePath = event.getServicePathForData(); // Get the event headers