Skip to content

Commit 724373d

Browse files
committed
unified if-else
1 parent a09a6f4 commit 724373d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

spring-boot-starter-camunda/src/main/java/io/camunda/zeebe/spring/client/properties/PropertyBasedZeebeWorkerValueCustomizer.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,7 @@ private void applyFetchVariables(ZeebeWorkerValue zeebeWorkerValue) {
4949
LOG.debug(
5050
"Worker '{}': ActivatedJob is injected, no variable filtering possible",
5151
zeebeWorkerValue.getName());
52-
return;
53-
}
54-
if (zeebeWorkerValue.isForceFetchAllVariables()) {
52+
} else if (zeebeWorkerValue.isForceFetchAllVariables()) {
5553
LOG.debug("Worker '{}': Force fetch all variables is enabled", zeebeWorkerValue.getName());
5654
zeebeWorkerValue.setFetchVariables(new String[0]);
5755
} else {
@@ -74,7 +72,7 @@ private void applyFetchVariables(ZeebeWorkerValue zeebeWorkerValue) {
7472

7573
private boolean hasActivatedJobInjected(ZeebeWorkerValue zeebeWorkerValue) {
7674
return zeebeWorkerValue.getMethodInfo().getParameters().stream()
77-
.anyMatch(p -> p.getParameterInfo().getType().equals(ActivatedJob.class));
75+
.anyMatch(p -> p.getParameterInfo().getType().isAssignableFrom(ActivatedJob.class));
7876
}
7977

8078
private String extractVariableName(ParameterInfo parameterInfo) {

0 commit comments

Comments
 (0)