From 2aa2911be146d918642261d91f42696179abab07 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Thu, 14 Mar 2024 18:00:41 -0400 Subject: [PATCH] PROTON-2806 Construct the correct error message for wrong delivery ID Use the correct expected value in the error message. --- .../qpid/protonj2/engine/impl/ProtonSessionIncomingWindow.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/protonj2/src/main/java/org/apache/qpid/protonj2/engine/impl/ProtonSessionIncomingWindow.java b/protonj2/src/main/java/org/apache/qpid/protonj2/engine/impl/ProtonSessionIncomingWindow.java index d4acc17e..89db238b 100644 --- a/protonj2/src/main/java/org/apache/qpid/protonj2/engine/impl/ProtonSessionIncomingWindow.java +++ b/protonj2/src/main/java/org/apache/qpid/protonj2/engine/impl/ProtonSessionIncomingWindow.java @@ -246,10 +246,9 @@ void validateNextDeliveryId(long deliveryId) { if (lastDeliveryid == null) { lastDeliveryid = new SequenceNumber((int) deliveryId); } else { - int previousId = lastDeliveryid.intValue(); if (lastDeliveryid.increment().compareTo((int) deliveryId) != 0) { session.getConnection().getEngine().engineFailed( - new ProtocolViolationException("Expected delivery-id " + previousId + ", got " + deliveryId)); + new ProtocolViolationException("Expected delivery-id " + lastDeliveryid + ", got " + deliveryId)); } } }