You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ro...@apache.org on 2019/05/01 15:39:52 UTC

[qpid-proton-j] branch master updated: PROTON-2029: tweaks #33 to apply the state but only prevent generating the frame, add clarifying doc comment.

This is an automated email from the ASF dual-hosted git repository.

robbie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton-j.git


The following commit(s) were added to refs/heads/master by this push:
     new 22705b6  PROTON-2029: tweaks #33 to apply the state but only prevent generating the frame, add clarifying doc comment.
22705b6 is described below

commit 22705b69bec3f7fb87904ff7873ca158b3f3c3bd
Author: Robbie Gemmell <ro...@apache.org>
AuthorDate: Wed May 1 16:29:13 2019 +0100

    PROTON-2029: tweaks #33 to apply the state but only prevent generating the frame, add clarifying doc comment.
    
    Retains existing order independence (between output processing) to avoid unlikely but possible breakage of existing uses.
---
 proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java  | 2 ++
 .../main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java  | 6 +-----
 2 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java
index b997309..5bdd364 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/Delivery.java
@@ -42,6 +42,8 @@ public interface Delivery extends Extendable
     /**
      * updates the state of the delivery
      *
+     * The new state may have no on-the-wire effect, if delivery settlement was already communicated to/from the peer.
+     *
      * @param state the new delivery state
      */
     public void disposition(DeliveryState state);
diff --git a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java
index 7312bef..2928d37 100644
--- a/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java
+++ b/proton-j/src/main/java/org/apache/qpid/proton/engine/impl/DeliveryImpl.java
@@ -132,12 +132,8 @@ public class DeliveryImpl implements Delivery
     @Override
     public void disposition(final DeliveryState state)
     {
-        if (_settled) {
-            return;
-        }
-
         _deliveryState = state;
-        if(!_remoteSettled)
+        if(!_remoteSettled && !_settled)
         {
             addToTransportWorkList();
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org