Skip to content

Commit 408fc9c

Browse files
committed
fix: do not create map if resource is null
1 parent 4e44a50 commit 408fc9c

File tree

1 file changed

+1
-1
lines changed
  • operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/dependent

1 file changed

+1
-1
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/api/reconciler/dependent/ReconcileResult.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public String toString() {
4646
}
4747

4848
private ReconcileResult(R resource, Operation operation) {
49-
resourceOperations = Map.of(resource, operation);
49+
resourceOperations = resource != null ? Map.of(resource, operation) : Collections.emptyMap();
5050
}
5151

5252
private ReconcileResult(Map<R, Operation> operations) {

0 commit comments

Comments
 (0)