qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject qpid-broker-j git commit: QPID-8029: [Broker-J] [AMQP 0-8..0-91] Attempting to tx.rollback on a non-transacted session should not try to rollback
Date Tue, 05 Dec 2017 17:00:06 GMT
Repository: qpid-broker-j
Updated Branches:
  refs/heads/7.0.x 676d94341 -> dc6ce7fb9


QPID-8029: [Broker-J] [AMQP 0-8..0-91] Attempting to tx.rollback on a non-transacted session
should not try to rollback

(cherry picked from commit e3260f592c9d8eb7165c896d1ba5724e61c36d92)


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/dc6ce7fb
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/dc6ce7fb
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/dc6ce7fb

Branch: refs/heads/7.0.x
Commit: dc6ce7fb94f50677fcc3ad31ead136180bd96087
Parents: 676d943
Author: Keith Wall <kwall@apache.org>
Authored: Thu Nov 9 15:42:05 2017 +0000
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Tue Dec 5 16:59:18 2017 +0000

----------------------------------------------------------------------
 .../qpid/server/protocol/v0_8/AMQChannel.java   | 22 +++++++-------------
 1 file changed, 8 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/dc6ce7fb/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
b/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
index 3e47616..df9f946 100644
--- a/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
+++ b/broker-plugins/amqp-0-8-protocol/src/main/java/org/apache/qpid/server/protocol/v0_8/AMQChannel.java
@@ -3361,24 +3361,18 @@ public class AMQChannel extends AbstractAMQPSession<AMQChannel,
ConsumerTarget_0
             closeChannel(ErrorCodes.COMMAND_INVALID,
                          "Fatal error: rollback called on non-transactional channel");
         }
-
-        final MethodRegistry methodRegistry = _connection.getMethodRegistry();
-        final AMQMethodBody responseBody = methodRegistry.createTxRollbackOkBody();
-
-        Runnable task = new Runnable()
+        else
         {
+            final MethodRegistry methodRegistry = _connection.getMethodRegistry();
+            final AMQMethodBody responseBody = methodRegistry.createTxRollbackOkBody();
 
-            @Override
-            public void run()
-            {
-                _connection.writeFrame(responseBody.generateFrame(_channelId));
-            }
-        };
+            Runnable task = () -> _connection.writeFrame(responseBody.generateFrame(_channelId));
 
-        rollback(task);
+            rollback(task);
 
-        // TODO: This is not spec compliant but we currently seem to rely on this behaviour
-        resend();
+            // TODO: This is not spec compliant but we currently seem to rely on this behaviour
+            resend();
+        }
     }
 
     @Override


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


Mime
View raw message