Skip to content

Commit d6cd731

Browse files
committed
replace put(clusterName, null) with remove(clusterName) in Main.dispatchServiceWatch to avoid NPE
1 parent d04d9e0 commit d6cd731

File tree

1 file changed

+1
-1
lines changed
  • operator/src/main/java/oracle/kubernetes/operator

1 file changed

+1
-1
lines changed

operator/src/main/java/oracle/kubernetes/operator/Main.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -960,7 +960,7 @@ private static void dispatchServiceWatch(Watch.Response<V1Service> item) {
960960
}
961961
}
962962
} else if (clusterName != null) {
963-
V1Service oldService = info.getClusters().put(clusterName, null);
963+
V1Service oldService = info.getClusters().remove(clusterName);
964964
if (oldService != null) {
965965
// Service was deleted, but clusters still contained a non-null entry
966966
LOGGER.info(

0 commit comments

Comments
 (0)