activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andytay...@apache.org
Subject activemq-artemis git commit: build fix for code style issues
Date Sat, 03 Dec 2016 09:29:03 GMT
Repository: activemq-artemis
Updated Branches:
  refs/heads/ARTEMIS-780 b59ddaa61 -> 7d84b1e13


build fix for code style issues


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

Branch: refs/heads/ARTEMIS-780
Commit: 7d84b1e13e4c67d63f70e165603d489b54edb722
Parents: b59ddaa
Author: Andy Taylor <andy.tayls67@gmail.com>
Authored: Sat Dec 3 09:28:13 2016 +0000
Committer: Andy Taylor <andy.tayls67@gmail.com>
Committed: Sat Dec 3 09:28:48 2016 +0000

----------------------------------------------------------------------
 .../amqp/proton/ProtonServerSenderContext.java  | 23 ++++++++------------
 .../core/postoffice/impl/CompositeAddress.java  |  7 ++----
 .../postoffice/impl/SimpleAddressManager.java   |  2 ++
 .../integration/amqp/AmqpTransactionTest.java   |  2 --
 .../amqp/BrokerDefinedAnycastConsumerTest.java  |  8 +++----
 .../BrokerDefinedMulticastConsumerTest.java     |  5 +++--
 .../integration/openwire/BasicOpenWireTest.java |  1 -
 7 files changed, 19 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
----------------------------------------------------------------------
diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
index b998b25..06a6f9b 100644
--- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
+++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/proton/ProtonServerSenderContext.java
@@ -223,8 +223,7 @@ public class ProtonServerSenderContext extends ProtonInitializable implements
Pr
             CompositeAddress compositeAddress = CompositeAddress.getQueueName(source.getAddress());
             addressToUse = new SimpleString(compositeAddress.getAddress());
             queueNameToUse = new SimpleString(compositeAddress.getQueueName());
-         }
-         else {
+         } else {
             addressToUse = new SimpleString(source.getAddress());
          }
          //check to see if the client has defined how we act
@@ -236,19 +235,16 @@ public class ProtonServerSenderContext extends ProtonInitializable implements
Pr
             //if the client defines 1 routing type and the broker another then throw an exception
             if (multicast && !routingTypes.contains(RoutingType.MULTICAST)) {
                throw new ActiveMQAMQPIllegalStateException("Address is not configured for
topic support");
-            }
-            else if (!multicast && !routingTypes.contains(RoutingType.ANYCAST)) {
+            } else if (!multicast && !routingTypes.contains(RoutingType.ANYCAST))
{
                throw new ActiveMQAMQPIllegalStateException("Address is not configured for
queue support");
             }
-         }
-         else {
+         } else {
             //if not we look up the address
             AddressInfo addressInfo = sessionSPI.getAddress(addressToUse);
             Set<RoutingType> routingTypes = addressInfo.getRoutingTypes();
             if (routingTypes.contains(RoutingType.MULTICAST) && routingTypes.size()
== 1) {
                multicast = true;
-            }
-            else {
+            } else {
                multicast = false;
             }
          }
@@ -276,10 +272,10 @@ public class ProtonServerSenderContext extends ProtonInitializable implements
Pr
             //if the address specifies a broker configured queue then we always use this,
treat it as a queue
             if (queue != null) {
                multicast = false;
-            }
-            // if we are a subscription and durable create a durable queue using the container
-            // id and link name
-            else if (TerminusDurability.UNSETTLED_STATE.equals(source.getDurable()) || TerminusDurability.CONFIGURATION.equals(source.getDurable()))
{
+            } else if (TerminusDurability.UNSETTLED_STATE.equals(source.getDurable()) ||
TerminusDurability.CONFIGURATION.equals(source.getDurable())) {
+
+               // if we are a subscription and durable create a durable queue using the container
+               // id and link name
                String clientId = getClientId();
                String pubId = sender.getName();
                queue = createQueueName(clientId, pubId);
@@ -314,8 +310,7 @@ public class ProtonServerSenderContext extends ProtonInitializable implements
Pr
             if (queueNameToUse != null) {
                SimpleString matchingAnycastQueue = sessionSPI.getMatchingQueue(addressToUse,
queueNameToUse, RoutingType.ANYCAST);
                queue = matchingAnycastQueue.toString();
-            }
-            else {
+            } else {
                SimpleString matchingAnycastQueue = sessionSPI.getMatchingQueue(addressToUse,
RoutingType.ANYCAST);
                queue = matchingAnycastQueue.toString();
             }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/CompositeAddress.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/CompositeAddress.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/CompositeAddress.java
index bc12fb7..32083a5 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/CompositeAddress.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/CompositeAddress.java
@@ -16,12 +16,9 @@
  */
 package org.apache.activemq.artemis.core.postoffice.impl;
 
-
-import org.apache.activemq.artemis.api.core.SimpleString;
-
 public class CompositeAddress {
 
-   public static String SEPARATOR ="::";
+   public static String SEPARATOR = "::";
    private final String address;
    private final String queueName;
 
@@ -45,7 +42,7 @@ public class CompositeAddress {
 
    public static CompositeAddress getQueueName(String address) {
       String[] split = address.split(SEPARATOR);
-      if(split.length <= 0) {
+      if (split.length <= 0) {
          throw new IllegalStateException("Nott A Fully Qualified Name");
       }
       return new CompositeAddress(split[0], split[1]);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
index e39626f..c5f7e21 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/SimpleAddressManager.java
@@ -118,6 +118,7 @@ public class SimpleAddressManager implements AddressManager {
       return bindings;
    }
 
+   @Override
    public SimpleString getMatchingQueue(final SimpleString address, RoutingType routingType)
throws Exception {
 
       Binding binding = nameMap.get(address);
@@ -136,6 +137,7 @@ public class SimpleAddressManager implements AddressManager {
       return binding != null ? binding.getUniqueName() : null;
    }
 
+   @Override
    public SimpleString getMatchingQueue(final SimpleString address, final SimpleString queueName,
RoutingType routingType) throws Exception {
       Binding binding = nameMap.get(queueName);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpTransactionTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpTransactionTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpTransactionTest.java
index 627a3e4..1708720 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpTransactionTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/AmqpTransactionTest.java
@@ -20,7 +20,6 @@ package org.apache.activemq.artemis.tests.integration.amqp;
 import java.util.ArrayList;
 import java.util.concurrent.TimeUnit;
 
-import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.transport.amqp.client.AmqpClient;
 import org.apache.activemq.transport.amqp.client.AmqpConnection;
@@ -28,7 +27,6 @@ import org.apache.activemq.transport.amqp.client.AmqpMessage;
 import org.apache.activemq.transport.amqp.client.AmqpReceiver;
 import org.apache.activemq.transport.amqp.client.AmqpSender;
 import org.apache.activemq.transport.amqp.client.AmqpSession;
-import org.junit.Before;
 import org.junit.Test;
 
 /**

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedAnycastConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedAnycastConsumerTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedAnycastConsumerTest.java
index 38bb97a..7a4299e 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedAnycastConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedAnycastConsumerTest.java
@@ -26,12 +26,9 @@ import org.apache.activemq.transport.amqp.client.AmqpMessage;
 import org.apache.activemq.transport.amqp.client.AmqpReceiver;
 import org.apache.activemq.transport.amqp.client.AmqpSender;
 import org.apache.activemq.transport.amqp.client.AmqpSession;
-import org.apache.qpid.proton.amqp.Symbol;
 import org.apache.qpid.proton.amqp.messaging.Source;
 import org.junit.Test;
 
-import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.concurrent.TimeUnit;
 
 import static org.apache.qpid.jms.provider.amqp.message.AmqpDestinationHelper.QUEUE_CAPABILITY;
@@ -166,14 +163,15 @@ public class BrokerDefinedAnycastConsumerTest extends AmqpClientTestSupport
 {
       try {
          session.createReceiver(jmsSource);
          fail("should throw exception");
-      } catch (Exception e) {//ignore
+      } catch (Exception e) {
+         //ignore
       }
       connection.close();
    }
 
    private void sendMessages(int numMessages, String address) throws Exception {
       AmqpClient client = createAmqpClient();
-            AmqpConnection connection = addConnection(client.connect());
+      AmqpConnection connection = addConnection(client.connect());
       AmqpSession session = connection.createSession();
       AmqpSender sender = session.createSender(address);
       for (int i = 0; i < numMessages; i++) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedMulticastConsumerTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedMulticastConsumerTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedMulticastConsumerTest.java
index d5be5f2..2b4e2b4 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedMulticastConsumerTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/amqp/BrokerDefinedMulticastConsumerTest.java
@@ -77,14 +77,15 @@ public class BrokerDefinedMulticastConsumerTest extends AmqpClientTestSupport
 {
       try {
          session.createReceiver(jmsSource);
          fail("should throw exception");
-      } catch (Exception e) {//ignore
+      } catch (Exception e) {
+         //ignore
       }
       connection.close();
    }
 
    private void sendMessages(int numMessages, String address) throws Exception {
       AmqpClient client = createAmqpClient();
-            AmqpConnection connection = addConnection(client.connect());
+      AmqpConnection connection = addConnection(client.connect());
       AmqpSession session = connection.createSession();
       AmqpSender sender = session.createSender(address);
       for (int i = 0; i < numMessages; i++) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7d84b1e1/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
index e6026c4..63cf579 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/openwire/BasicOpenWireTest.java
@@ -33,7 +33,6 @@ import org.apache.activemq.ActiveMQXAConnectionFactory;
 import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.server.RoutingType;
-import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.junit.After;
 import org.junit.Before;


Mime
View raw message