Skip to content
Snippets Groups Projects
Commit 2ab2fbf5 authored by Jan Zickermann's avatar Jan Zickermann
Browse files

OZG-6891 Use instanceof casting

parent eddcde18
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,8 @@ public class XtaExceptionHandler { ...@@ -17,8 +17,8 @@ public class XtaExceptionHandler {
static final String UNEXPECTED_ERROR_MESSAGE = "An unexpected error occurred. Please report this to the xta-client maintainers."; static final String UNEXPECTED_ERROR_MESSAGE = "An unexpected error occurred. Please report this to the xta-client maintainers.";
public XtaClientException deriveXtaClientException(RuntimeException exception) { public XtaClientException deriveXtaClientException(RuntimeException exception) {
if (exception instanceof ClientRuntimeException) { if (exception instanceof ClientRuntimeException clientRuntimeException) {
return deriveXtaClientExceptionFromClientRuntimeException((ClientRuntimeException) exception); return deriveXtaClientExceptionFromClientRuntimeException(clientRuntimeException);
} }
return new XtaClientException(UNEXPECTED_ERROR_MESSAGE, exception); return new XtaClientException(UNEXPECTED_ERROR_MESSAGE, exception);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment