activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: Clean up some imports and get rid of some warnings throught the code.
Date Fri, 07 Mar 2014 23:12:06 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk ddf0b2a30 -> da5d0d819


Clean up some imports and get rid of some warnings throught the code.

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

Branch: refs/heads/trunk
Commit: da5d0d819ecbcec8ee65a5fa54e8982744fd6594
Parents: ddf0b2a
Author: Timothy Bish <tabish121@gmai.com>
Authored: Fri Mar 7 18:12:04 2014 -0500
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Fri Mar 7 18:12:04 2014 -0500

----------------------------------------------------------------------
 .../apache/activemq/transport/amqp/ActiveMQJMSVendor.java   | 3 ++-
 .../apache/activemq/transport/amqp/AmqpNioTransport.java    | 9 ++++++---
 .../activemq/transport/amqp/AmqpProtocolConverter.java      | 1 -
 .../activemq/transport/amqp/IAmqpProtocolConverter.java     | 6 ++----
 .../org/apache/activemq/transport/amqp/AmqpTestSupport.java | 7 ++++---
 .../apache/activemq/transport/amqp/JMSClientNioTest.java    | 7 -------
 .../transport/amqp/joram/JoramJmsNioPlusSslTest.java        | 1 -
 .../apache/activemq/transport/amqp/joram/JoramJmsTest.java  | 1 -
 8 files changed, 14 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/ActiveMQJMSVendor.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/ActiveMQJMSVendor.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/ActiveMQJMSVendor.java
index 3381c75..bb81ca4 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/ActiveMQJMSVendor.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/ActiveMQJMSVendor.java
@@ -27,6 +27,7 @@ import javax.jms.TemporaryQueue;
 import javax.jms.TemporaryTopic;
 import javax.jms.TextMessage;
 import javax.jms.Topic;
+
 import org.apache.activemq.command.ActiveMQBytesMessage;
 import org.apache.activemq.command.ActiveMQDestination;
 import org.apache.activemq.command.ActiveMQMapMessage;
@@ -80,11 +81,11 @@ public class ActiveMQJMSVendor extends JMSVendor {
     }
 
     @Override
-    @SuppressWarnings("deprecation")
     public Destination createDestination(String name) {
         return super.createDestination(name, Destination.class);
     }
 
+    @Override
     public <T extends Destination> T createDestination(String name, Class<T>
kind) {
         if( kind == Queue.class ) {
             return kind.cast(new ActiveMQQueue(name));

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioTransport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioTransport.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioTransport.java
index dfb5f60..e94cb0b 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioTransport.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpNioTransport.java
@@ -38,14 +38,12 @@ import org.apache.activemq.util.IOExceptionSupport;
 import org.apache.activemq.util.ServiceStopper;
 import org.apache.activemq.wireformat.WireFormat;
 import org.fusesource.hawtbuf.Buffer;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /**
  * An implementation of the {@link org.apache.activemq.transport.Transport} interface for
using AMQP over NIO
  */
 public class AmqpNioTransport extends TcpTransport {
-    private DataInputStream amqpHeaderValue = new DataInputStream(new ByteArrayInputStream(new
byte[]{'A', 'M', 'Q', 'P'}));
+    private final DataInputStream amqpHeaderValue = new DataInputStream(new ByteArrayInputStream(new
byte[]{'A', 'M', 'Q', 'P'}));
     private final Integer AMQP_HEADER_VALUE = amqpHeaderValue.readInt();
 
     private SocketChannel channel;
@@ -61,17 +59,20 @@ public class AmqpNioTransport extends TcpTransport {
         super(wireFormat, socket);
     }
 
+    @Override
     protected void initializeStreams() throws IOException {
         channel = socket.getChannel();
         channel.configureBlocking(false);
         // listen for events telling us when the socket is readable.
         selection = SelectorManager.getInstance().register(channel, new SelectorManager.Listener()
{
+            @Override
             public void onSelect(SelectorSelection selection) {
                 if (!isStopped()) {
                     serviceRead();
                 }
             }
 
+            @Override
             public void onError(SelectorSelection selection, Throwable error) {
                 if (error instanceof IOException) {
                     onException((IOException) error);
@@ -154,12 +155,14 @@ public class AmqpNioTransport extends TcpTransport {
         }
     }
 
+    @Override
     protected void doStart() throws Exception {
         connect();
         selection.setInterestOps(SelectionKey.OP_READ);
         selection.enable();
     }
 
+    @Override
     protected void doStop(ServiceStopper stopper) throws Exception {
         try {
             if (selection != null) {

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
index a1730c0..7c5764a 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/AmqpProtocolConverter.java
@@ -1151,7 +1151,6 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
                         if (response.isException()) {
                             sender.setSource(null);
                             Throwable exception = ((ExceptionResponse) response).getException();
-                            String name = exception.getClass().getName();
                             sender.setCondition(new ErrorCondition(AmqpError.INTERNAL_ERROR,
exception.getMessage()));
                         }
                         sender.open();

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/IAmqpProtocolConverter.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/IAmqpProtocolConverter.java
b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/IAmqpProtocolConverter.java
index 51d4da8..d4eb648 100644
--- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/IAmqpProtocolConverter.java
+++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/IAmqpProtocolConverter.java
@@ -16,11 +16,9 @@
  */
 package org.apache.activemq.transport.amqp;
 
-import org.apache.activemq.command.Command;
-import org.fusesource.hawtbuf.Buffer;
-
 import java.io.IOException;
-import java.util.concurrent.locks.ReentrantLock;
+
+import org.apache.activemq.command.Command;
 
 /**
  */

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
index a44874f..bf3a4cb 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/AmqpTestSupport.java
@@ -82,7 +82,7 @@ public class AmqpTestSupport {
         Future<Boolean> future = executor.submit(new SetUpTask());
         try {
             LOG.debug("SetUpTask started.");
-            Boolean result =  future.get(60, TimeUnit.SECONDS);
+            future.get(60, TimeUnit.SECONDS);
         } catch (TimeoutException e) {
             throw new Exception("startBroker timed out");
         }
@@ -164,7 +164,7 @@ public class AmqpTestSupport {
         Future<Boolean> future = executor.submit(new TearDownTask());
         try {
             LOG.debug("tearDown started.");
-            Boolean result =  future.get(60, TimeUnit.SECONDS);
+            future.get(60, TimeUnit.SECONDS);
         } catch (TimeoutException e) {
             throw new Exception("startBroker timed out");
         }
@@ -247,6 +247,7 @@ public class AmqpTestSupport {
     }
 
     public class SetUpTask implements Callable<Boolean> {
+        @SuppressWarnings("unused")
         private String testName;
 
         @Override
@@ -259,6 +260,7 @@ public class AmqpTestSupport {
     }
 
     public class TearDownTask implements Callable<Boolean> {
+        @SuppressWarnings("unused")
         private String testName;
 
         @Override
@@ -269,5 +271,4 @@ public class AmqpTestSupport {
             return Boolean.TRUE;
         }
     }
-
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientNioTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientNioTest.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientNioTest.java
index 68f93c3..7ac67a6 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientNioTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/JMSClientNioTest.java
@@ -16,16 +16,9 @@
  */
 package org.apache.activemq.transport.amqp;
 
-import javax.jms.JMSException;
-
-import org.junit.Ignore;
-import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.io.ByteArrayInputStream;
-import java.io.DataInputStream;
-
 /**
  * Test the JMS client when connected to the NIO transport.
  */

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsNioPlusSslTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsNioPlusSslTest.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsNioPlusSslTest.java
index 168b077..15d86f3 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsNioPlusSslTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsNioPlusSslTest.java
@@ -24,7 +24,6 @@ import javax.net.ssl.TrustManager;
 
 import org.apache.activemq.transport.amqp.DefaultTrustManager;
 import org.junit.BeforeClass;
-import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.rules.Timeout;
 import org.junit.runner.RunWith;

http://git-wip-us.apache.org/repos/asf/activemq/blob/da5d0d81/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
----------------------------------------------------------------------
diff --git a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
index 19ae97b..b617c44 100644
--- a/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
+++ b/activemq-amqp/src/test/java/org/apache/activemq/transport/amqp/joram/JoramJmsTest.java
@@ -35,7 +35,6 @@ import org.objectweb.jtests.jms.conform.selector.SelectorSyntaxTest;
 import org.objectweb.jtests.jms.conform.selector.SelectorTest;
 import org.objectweb.jtests.jms.conform.session.QueueSessionTest;
 import org.objectweb.jtests.jms.conform.session.SessionTest;
-import org.objectweb.jtests.jms.conform.session.UnifiedSessionTest;
 import org.objectweb.jtests.jms.conform.topic.TemporaryTopicTest;
 
 public class JoramJmsTest extends TestCase {


Mime
View raw message