diff --git a/src/main/scala/alpakka/env/jms/AESBroker.java b/src/main/scala/alpakka/env/jms/AESBroker.java index e55f0e85..862cd365 100644 --- a/src/main/scala/alpakka/env/jms/AESBroker.java +++ b/src/main/scala/alpakka/env/jms/AESBroker.java @@ -175,12 +175,12 @@ public void send(ProducerBrokerExchange producerExchange, Message messageSend) t } public void preProcessDispatch(MessageDispatch messageDispatch) { - if (messageDispatch.getMessage() instanceof ActiveMQTextMessage encryptedMessage) { + if (messageDispatch.getMessage() instanceof ActiveMQTextMessage) { + ActiveMQTextMessage encryptedMessage = (ActiveMQTextMessage) messageDispatch.getMessage(); ActiveMQTextMessage decryptedMessage = (ActiveMQTextMessage) decryptMessage(encryptedMessage); messageDispatch.setMessage(decryptedMessage); next.preProcessDispatch(messageDispatch); } - ; } // Synonym for IV would be: nonce (= number once)