activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5699
Date Tue, 05 May 2015 23:06:02 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 4b4cf7c09 -> 6a2ffca57


https://issues.apache.org/jira/browse/AMQ-5699

Use constant symbols that are now available in v0.9+ of proton-j

Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/6a2ffca5
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/6a2ffca5
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/6a2ffca5

Branch: refs/heads/master
Commit: 6a2ffca57e72a92fa90eed578d9be15be59686a3
Parents: 4b4cf7c
Author: Timothy Bish <tabish121@gmail.com>
Authored: Tue May 5 19:04:44 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Tue May 5 19:04:44 2015 -0400

----------------------------------------------------------------------
 .../activemq/transport/amqp/client/AmqpReceiver.java    | 12 +++---------
 .../activemq/transport/amqp/client/AmqpSender.java      |  5 +----
 2 files changed, 4 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/6a2ffca5/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpReceiver.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpReceiver.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpReceiver.java
index 978075c..049fe4d 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpReceiver.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpReceiver.java
@@ -38,6 +38,7 @@ import org.apache.qpid.proton.amqp.DescribedType;
 import org.apache.qpid.proton.amqp.Symbol;
 import org.apache.qpid.proton.amqp.messaging.Accepted;
 import org.apache.qpid.proton.amqp.messaging.Modified;
+import org.apache.qpid.proton.amqp.messaging.Rejected;
 import org.apache.qpid.proton.amqp.messaging.Released;
 import org.apache.qpid.proton.amqp.messaging.Source;
 import org.apache.qpid.proton.amqp.messaging.Target;
@@ -58,14 +59,7 @@ public class AmqpReceiver extends AmqpAbstractResource<Receiver>
{
 
     private static final Logger LOG = LoggerFactory.getLogger(AmqpReceiver.class);
 
-    // TODO: Use constants available from Proton 0.9
-    private static final Symbol ACCEPTED_DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:accepted:list");
-    private static final Symbol REJECTED_DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:rejected:list");
-    private static final Symbol MODIFIED_DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:modified:list");
-    private static final Symbol RELEASED_DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:released:list");
-
     private final AtomicBoolean closed = new AtomicBoolean();
-
     private final BlockingQueue<AmqpMessage> prefetch = new LinkedBlockingDeque<AmqpMessage>();
 
     private final AmqpSession session;
@@ -534,8 +528,8 @@ public class AmqpReceiver extends AmqpAbstractResource<Receiver>
{
 
     protected void configureSource(Source source) {
         Map<Symbol, DescribedType> filters = new HashMap<Symbol, DescribedType>();
-        Symbol[] outcomes = new Symbol[]{ACCEPTED_DESCRIPTOR_SYMBOL, REJECTED_DESCRIPTOR_SYMBOL,
-                                         RELEASED_DESCRIPTOR_SYMBOL, MODIFIED_DESCRIPTOR_SYMBOL};
+        Symbol[] outcomes = new Symbol[]{Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL,
+                                         Released.DESCRIPTOR_SYMBOL, Modified.DESCRIPTOR_SYMBOL};
 
         if (getSubscriptionName() != null && !getSubscriptionName().isEmpty()) {
             source.setExpiryPolicy(TerminusExpiryPolicy.NEVER);

http://git-wip-us.apache.org/repos/asf/activemq/blob/6a2ffca5/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpSender.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpSender.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpSender.java
index e8e5c8b..303c7b2 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpSender.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/client/AmqpSender.java
@@ -52,9 +52,6 @@ public class AmqpSender extends AmqpAbstractResource<Sender> {
 
     private static final Logger LOG = LoggerFactory.getLogger(AmqpSender.class);
     private static final byte[] EMPTY_BYTE_ARRAY = new byte[] {};
-    //TODO: Use constants available from Proton 0.9
-    private static final Symbol ACCEPTED_DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:accepted:list");
-    private static final Symbol REJECTED_DESCRIPTOR_SYMBOL = Symbol.valueOf("amqp:rejected:list");
 
     public static final long DEFAULT_SEND_TIMEOUT = 15000;
 
@@ -240,7 +237,7 @@ public class AmqpSender extends AmqpAbstractResource<Sender> {
     @Override
     protected void doOpen() {
 
-        Symbol[] outcomes = new Symbol[]{ACCEPTED_DESCRIPTOR_SYMBOL, REJECTED_DESCRIPTOR_SYMBOL};
+        Symbol[] outcomes = new Symbol[]{ Accepted.DESCRIPTOR_SYMBOL, Rejected.DESCRIPTOR_SYMBOL
};
         Source source = new Source();
         source.setAddress(senderId);
         source.setOutcomes(outcomes);


Mime
View raw message