Skip to content

Commit ca68ca1

Browse files
Andrew SchofieldAndrew Schofield
authored andcommitted
Handle ClassCastException
1 parent d50abca commit ca68ca1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/com/ibm/eventstreams/connect/mqsink/JMSWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ else if (connectionMode.equals(MQSinkConnector.CONFIG_VALUE_MQ_CONNECTION_MODE_B
170170
builder = c.newInstance();
171171
builder.configure(props);
172172
}
173-
catch (ClassNotFoundException | IllegalAccessException | InstantiationException | NullPointerException exc) {
173+
catch (ClassNotFoundException | ClassCastException | IllegalAccessException | InstantiationException | NullPointerException exc) {
174174
log.error("Could not instantiate message builder {}", builderClass);
175175
throw new ConnectException("Could not instantiate message builder", exc);
176176
}

0 commit comments

Comments
 (0)