Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit 2568c86

Browse files
committed
add null check
1 parent fcc2f55 commit 2568c86

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/java/org/brapi/test/BrAPITestServer/service/core/ListService.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,11 @@ private void updateEntity(ListEntity entity, @Valid ListNewRequest list) throws
289289
}
290290
}
291291
} else {
292-
entity.getData().clear();
292+
if (entity.getData() == null) {
293+
entity.setData(new ArrayList<>());
294+
} else {
295+
entity.getData().clear();
296+
}
293297
}
294298

295299
}

0 commit comments

Comments
 (0)