Skip to content

Commit

Permalink
Merge pull request #2294 from telefonicaid/fix/access_aggregator_size
Browse files Browse the repository at this point in the history
fix runtime error: check aggregator before access
  • Loading branch information
fgalan authored Sep 13, 2023
2 parents 1379d9f + fb93e84 commit b5d2347
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES_NEXT_RELEASE
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b5d2347

Please sign in to comment.