You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2016/11/23 17:43:19 UTC

[18/48] activemq-artemis git commit: Checkstyle, etc.

Checkstyle, etc.


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

Branch: refs/heads/ARTEMIS-780
Commit: dd1a9ccd78526033af5f1b4d87b3463cfab62966
Parents: 3a8552d
Author: jbertram <jb...@apache.com>
Authored: Wed Nov 16 11:33:28 2016 -0600
Committer: jbertram <jb...@apache.com>
Committed: Wed Nov 23 09:04:34 2016 -0600

----------------------------------------------------------------------
 .../apache/activemq/artemis/cli/commands/AbstractAction.java    | 1 -
 .../activemq/artemis/cli/commands/address/CreateAddress.java    | 1 -
 .../activemq/artemis/cli/commands/address/ShowAddress.java      | 3 +--
 .../artemis/core/management/impl/ActiveMQServerControlImpl.java | 5 +----
 .../activemq/artemis/core/postoffice/impl/PostOfficeImpl.java   | 2 +-
 .../org/apache/activemq/artemis/core/server/ActiveMQServer.java | 1 -
 .../activemq/artemis/core/server/impl/ActiveMQServerImpl.java   | 2 +-
 .../artemis/tests/integration/cli/AddressCommandTest.java       | 4 ----
 .../artemis/tests/integration/cli/QueueCommandTest.java         | 4 ++--
 9 files changed, 6 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
index b4dbba8..3619ed7 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/AbstractAction.java
@@ -16,7 +16,6 @@
  */
 package org.apache.activemq.artemis.cli.commands;
 
-import io.airlift.airline.Option;
 import org.apache.activemq.artemis.api.core.client.ActiveMQClient;
 import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.client.ClientRequestor;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
index 6c92dc6..86aafaf 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/CreateAddress.java
@@ -23,7 +23,6 @@ import org.apache.activemq.artemis.api.core.client.ClientMessage;
 import org.apache.activemq.artemis.api.core.management.ManagementHelper;
 import org.apache.activemq.artemis.cli.commands.AbstractAction;
 import org.apache.activemq.artemis.cli.commands.ActionContext;
-import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 
 @Command(name = "create", description = "create an address")
 public class CreateAddress extends AbstractAction {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
----------------------------------------------------------------------
diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
index 34331bb..013b504 100644
--- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
+++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/address/ShowAddress.java
@@ -46,8 +46,7 @@ public class ShowAddress extends AbstractAction {
          public void setUpInvocation(ClientMessage message) throws Exception {
             if (bindings) {
                ManagementHelper.putOperationInvocation(message, "broker", "listBindingsForAddress", getName());
-            }
-            else {
+            } else {
                ManagementHelper.putOperationInvocation(message, "broker", "getAddressInfo", getName());
             }
          }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
index c38b2cf..b70abdc 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/management/impl/ActiveMQServerControlImpl.java
@@ -67,7 +67,6 @@ import org.apache.activemq.artemis.core.postoffice.Binding;
 import org.apache.activemq.artemis.core.postoffice.Bindings;
 import org.apache.activemq.artemis.core.postoffice.DuplicateIDCache;
 import org.apache.activemq.artemis.core.postoffice.PostOffice;
-import org.apache.activemq.artemis.core.postoffice.QueueBinding;
 import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.artemis.core.remoting.server.RemotingService;
 import org.apache.activemq.artemis.core.security.CheckType;
@@ -75,7 +74,6 @@ import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActiveMQMessageBundle;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
-import org.apache.activemq.artemis.core.server.BindingQueryResult;
 import org.apache.activemq.artemis.core.server.ConnectorServiceFactory;
 import org.apache.activemq.artemis.core.server.Consumer;
 import org.apache.activemq.artemis.core.server.JournalType;
@@ -792,8 +790,7 @@ public class ActiveMQServerControlImpl extends AbstractControl implements Active
       AddressInfo addressInfo = server.getAddressInfo(SimpleString.toSimpleString(address));
       if (addressInfo == null) {
          throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(SimpleString.toSimpleString(address));
-      }
-      else {
+      } else {
          return addressInfo.toString();
       }
    }

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
index 3064363..fbb6385 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/postoffice/impl/PostOfficeImpl.java
@@ -132,7 +132,7 @@ public class PostOfficeImpl implements PostOffice, NotificationListener, Binding
 
    private final ActiveMQServer server;
 
-   private Object addressLock = new Object();
+   private final Object addressLock = new Object();
 
    public PostOfficeImpl(final ActiveMQServer server,
                          final StorageManager storageManager,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
index c45be50..c0f1b97 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQServer.java
@@ -22,7 +22,6 @@ import java.util.Set;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.TimeUnit;
 
-import com.google.common.collect.Queues;
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.core.config.BridgeConfiguration;
 import org.apache.activemq.artemis.core.config.Configuration;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
index 5ab6ef7..b0d61ad 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ActiveMQServerImpl.java
@@ -2290,7 +2290,7 @@ public class ActiveMQServerImpl implements ActiveMQServer {
    public void removeAddressInfo(SimpleString address) throws Exception {
       if (postOffice.removeAddressInfo(address) == null) {
          throw ActiveMQMessageBundle.BUNDLE.addressDoesNotExist(address);
-      };
+      }
 
       // TODO: is this the right way to do this?
       //      long txID = storageManager.generateID();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
index 9589f47..4fceaef 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/AddressCommandTest.java
@@ -18,7 +18,6 @@ package org.apache.activemq.artemis.tests.integration.cli;
 
 import java.io.ByteArrayOutputStream;
 import java.io.PrintStream;
-import java.util.UUID;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.cli.commands.AbstractAction;
@@ -26,10 +25,7 @@ import org.apache.activemq.artemis.cli.commands.ActionContext;
 import org.apache.activemq.artemis.cli.commands.address.CreateAddress;
 import org.apache.activemq.artemis.cli.commands.address.DeleteAddress;
 import org.apache.activemq.artemis.cli.commands.address.ShowAddress;
-import org.apache.activemq.artemis.cli.commands.queue.CreateQueue;
-import org.apache.activemq.artemis.cli.commands.queue.DeleteQueue;
 import org.apache.activemq.artemis.core.config.DivertConfiguration;
-import org.apache.activemq.artemis.core.server.Queue;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
 import org.junit.Before;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/dd1a9ccd/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
----------------------------------------------------------------------
diff --git a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
index 5d7a695..9bddb8c 100644
--- a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
+++ b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/cli/QueueCommandTest.java
@@ -51,7 +51,7 @@ public class QueueCommandTest extends JMSTestBase {
       CreateQueue command = new CreateQueue();
       command.setName(queueName);
       command.execute(new ActionContext(System.in, new PrintStream(output), new PrintStream(error)));
-      checkExecutionFailure(command, "AMQ119203: Address Does Not Exist:");;
+      checkExecutionFailure(command, "AMQ119203: Address Does Not Exist:");
       assertFalse(server.queueQuery(new SimpleString(queueName)).isExists());
    }
 
@@ -74,7 +74,7 @@ public class QueueCommandTest extends JMSTestBase {
    @Test
    public void testCreateCoreQueueAddressExists() throws Exception {
       String queueName = "queue";
-      String address= "address";
+      String address = "address";
 
       CreateQueue command = new CreateQueue();
       command.setName(queueName);