Skip to content

Commit aff6db3

Browse files
committed
fix: remove useless check
If we're within the handleCreateOrUpdate scope then the resource is already guaranteed not to be marked for deletion.
1 parent f47a826 commit aff6db3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

operator-framework-core/src/main/java/io/javaoperatorsdk/operator/processing/EventDispatcher.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ private PostExecutionControl handleDispatch(ExecutionScope<R> executionScope) {
9191

9292
private PostExecutionControl handleCreateOrUpdate(
9393
ExecutionScope<R> executionScope, R resource, Context<R> context) {
94-
if (!resource.hasFinalizer(resourceFinalizer) && !resource.isMarkedForDeletion()) {
95-
/* We always add the finalizer if missing and not marked for deletion.
94+
if (!resource.hasFinalizer(resourceFinalizer)) {
95+
/* We always add the finalizer if missing.
9696
We execute the controller processing only for processing the event sent as a results
9797
of the finalizer add. This will make sure that the resources are not created before
9898
there is a finalizer.

0 commit comments

Comments
 (0)