From 80dfd44367d6d711b43a1f052bdb5981b9c80973 Mon Sep 17 00:00:00 2001 From: fml2 <534392+fml2@users.noreply.github.com> Date: Wed, 9 Oct 2024 06:45:26 +0200 Subject: [PATCH] Simplify class assignability check (#976) --- .../jobhandling/DefaultCommandExceptionHandlingStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-client-zeebe/src/main/java/io/camunda/zeebe/spring/client/jobhandling/DefaultCommandExceptionHandlingStrategy.java b/spring-client-zeebe/src/main/java/io/camunda/zeebe/spring/client/jobhandling/DefaultCommandExceptionHandlingStrategy.java index a40904402..223160480 100644 --- a/spring-client-zeebe/src/main/java/io/camunda/zeebe/spring/client/jobhandling/DefaultCommandExceptionHandlingStrategy.java +++ b/spring-client-zeebe/src/main/java/io/camunda/zeebe/spring/client/jobhandling/DefaultCommandExceptionHandlingStrategy.java @@ -45,7 +45,7 @@ public DefaultCommandExceptionHandlingStrategy( } public void handleCommandError(CommandWrapper command, Throwable throwable) { - if (StatusRuntimeException.class.isAssignableFrom(throwable.getClass())) { + if (throwable instanceof StatusRuntimeException) { StatusRuntimeException exception = (StatusRuntimeException) throwable; Status.Code code = exception.getStatus().getCode();