From ca68ca1a7916f58750df903e8819eceef3966c58 Mon Sep 17 00:00:00 2001 From: Andrew Schofield Date: Thu, 24 Oct 2019 16:13:17 -0500 Subject: [PATCH] Handle ClassCastException --- .../java/com/ibm/eventstreams/connect/mqsink/JMSWriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/ibm/eventstreams/connect/mqsink/JMSWriter.java b/src/main/java/com/ibm/eventstreams/connect/mqsink/JMSWriter.java index ca2ae3f..1e34759 100644 --- a/src/main/java/com/ibm/eventstreams/connect/mqsink/JMSWriter.java +++ b/src/main/java/com/ibm/eventstreams/connect/mqsink/JMSWriter.java @@ -170,7 +170,7 @@ else if (connectionMode.equals(MQSinkConnector.CONFIG_VALUE_MQ_CONNECTION_MODE_B builder = c.newInstance(); builder.configure(props); } - catch (ClassNotFoundException | IllegalAccessException | InstantiationException | NullPointerException exc) { + catch (ClassNotFoundException | ClassCastException | IllegalAccessException | InstantiationException | NullPointerException exc) { log.error("Could not instantiate message builder {}", builderClass); throw new ConnectException("Could not instantiate message builder", exc); }