Skip to content

Commit 2b07ff0

Browse files
author
Lucie Votypkova
committed
Throw exception if modifiedObjects is null.
1 parent f89401e commit 2b07ff0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

job-dsl-plugin/src/main/groovy/javaposse/jobdsl/plugin/actions/GeneratedObjectsRunAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public Collection<T> getModifiedObjects() {
4949

5050
public void addModifiedObjects(Collection<T> modifiedObjects) {
5151
if (this.modifiedObjects == null) {
52-
this.modifiedObjects = new LinkedHashSet<>(modifiedObjects);
52+
throw new IllegalStateException("Modified object should not be null. Probably wrong state after serialization/deserialization");
5353
} else {
5454
this.modifiedObjects.addAll(modifiedObjects);
5555
}

0 commit comments

Comments
 (0)