From f4ebf9c24d13deee3399faccab04456f61a60c41 Mon Sep 17 00:00:00 2001 From: Riley Date: Wed, 17 Apr 2024 14:32:00 -0400 Subject: [PATCH] #2898 Fixed onMessage method --- .../main/java/com/iluwatar/publishersubscriber/TBorrower.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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");