Skip to content

Commit 5399f6c

Browse files
authored
Merge pull request #341 from InseeFr/fixNullPointerOnStates
fix: null pointer
2 parents a44944a + a79a4d4 commit 5399f6c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/fr/insee/genesis/domain/service/rawdata/LunaticJsonRawDataService.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,10 @@ private static void convertToCollectedVar(
378378
Map<String, Object> states = JsonUtils.asMap(collectedVariable.getValue());
379379

380380
// nothing if no state
381+
if (states == null || states.isEmpty()) {
382+
continue;
383+
}
384+
381385
if (states.containsKey(stateKey)) {
382386
Object value = states.get(stateKey);
383387

0 commit comments

Comments
 (0)