From d0b64de5cce68fc39b511f66b6983650ed89a91c Mon Sep 17 00:00:00 2001 From: rdhabalia Date: Wed, 9 Oct 2024 22:34:18 -0700 Subject: [PATCH] fix type cast --- .../java/org/apache/pulsar/broker/service/AbstractTopic.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java index 2dd4f71837aaf..11f00fb28e34b 100644 --- a/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java +++ b/pulsar-broker/src/main/java/org/apache/pulsar/broker/service/AbstractTopic.java @@ -672,7 +672,7 @@ public CompletableFuture hasSchema() { .exceptionally(e -> { Throwable ex = e.getCause(); if (brokerService.pulsar().getConfig().isSchemaLedgerForceRecovery() - && !((SchemaException) ex).isRecoverable()) { + && (ex instanceof SchemaException && !((SchemaException) ex).isRecoverable())) { return false; } throw ex instanceof CompletionException ? (CompletionException) ex : new CompletionException(ex);