diff --git a/publisher-subscriber/src/main/java/com/iluwatar/publishersubscriber/TBorrower.java b/publisher-subscriber/src/main/java/com/iluwatar/publishersubscriber/TBorrower.java index 1489457e7ad8..1d489bdd00e0 100644 --- a/publisher-subscriber/src/main/java/com/iluwatar/publishersubscriber/TBorrower.java +++ b/publisher-subscriber/src/main/java/com/iluwatar/publishersubscriber/TBorrower.java @@ -65,7 +65,7 @@ public void onMessage(Message message) { try { BytesMessage bMessage = (BytesMessage) message; - double newRate = ((BytesMessage) message).readDouble(); + double newRate = ((BytesMessage) bMessage).readDouble(); if (currentRate - newRate >= 1) System.out.println("New Rate is " + newRate + " - Consider refinancing");