Repository: activemq-artemis
Updated Branches:
  refs/heads/master cc04b8ff1 -> 75d8a3c24


NO-JIRA: Addressing some deprecated usage on the codebase
- PROTOCOL_PROP_NAME
- ConnectionLifeCycleListener
- GENERIC_IGNORED_FILTER
- HttpHeaders.Names
- HttpHeaders.Names and similar


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

Branch: refs/heads/master
Commit: ad228e202f8e68741b8676859a473b46d1d1ad16
Parents: cc04b8f
Author: Jiri Danek <[email protected]>
Authored: Thu Jul 7 16:52:51 2016 +0200
Committer: Clebert Suconic <[email protected]>
Committed: Mon Jul 10 14:06:07 2017 -0400

----------------------------------------------------------------------
 .../client/impl/ClientSessionFactoryImpl.java   |   2 +-
 .../remoting/impl/netty/TransportConstants.java |   1 +
 .../jms/server/impl/JMSServerManagerImpl.java   |   4 +-
 .../core/remoting/impl/invm/InVMConnector.java  |   1 +
 .../impl/netty/HttpAcceptorHandler.java         |   8 +-
 .../core/remoting/impl/netty/NettyAcceptor.java |   4 +-
 .../server/impl/RemotingServiceImpl.java        |   2 +-
 .../websocket/WebSocketServerHandler.java       |  16 +--
 .../cli/test/WebServerComponentTest.java        |  10 +-
 .../integration/client/HangConsumerTest.java    |   2 +-
 .../jms/client/TopicCleanupTest.java            |   4 +-
 .../tests/integration/paging/PagingTest.java    |   2 +-
 .../NettyConnectorWithHTTPUpgradeTest.java      |   2 +-
 .../remoting/impl/netty/NettyConnectorTest.java | 134 +++----------------
 14 files changed, 50 insertions(+), 142 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
index 38da780..5106ed3 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/client/impl/ClientSessionFactoryImpl.java
@@ -338,7 +338,7 @@ public class ClientSessionFactoryImpl implements 
ClientSessionFactoryInternal, C
       return createSessionInternal(null, null, xa, autoCommitSends, 
autoCommitAcks, preAcknowledge, serverLocator.getAckBatchSize());
    }
 
-   // ConnectionLifeCycleListener implementation 
--------------------------------------------------
+   // ClientConnectionLifeCycleListener implementation 
--------------------------------------------------
 
    @Override
    public void connectionCreated(final ActiveMQComponent component,

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
----------------------------------------------------------------------
diff --git 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
index 30342ac..5288f38 100644
--- 
a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
+++ 
b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/TransportConstants.java
@@ -256,6 +256,7 @@ public class TransportConstants {
       allowableAcceptorKeys.add(TransportConstants.USE_NIO_PROP_NAME);
       allowableAcceptorKeys.add(TransportConstants.USE_EPOLL_PROP_NAME);
       allowableAcceptorKeys.add(TransportConstants.USE_INVM_PROP_NAME);
+      //noinspection deprecation
       allowableAcceptorKeys.add(TransportConstants.PROTOCOL_PROP_NAME);
       allowableAcceptorKeys.add(TransportConstants.PROTOCOLS_PROP_NAME);
       allowableAcceptorKeys.add(TransportConstants.HOST_PROP_NAME);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
index 0c381f1..7cbee52 100644
--- 
a/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
+++ 
b/artemis-jms-server/src/main/java/org/apache/activemq/artemis/jms/server/impl/JMSServerManagerImpl.java
@@ -50,6 +50,7 @@ import 
org.apache.activemq.artemis.api.core.management.ResourceNames;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
 import org.apache.activemq.artemis.api.jms.JMSFactoryType;
 import org.apache.activemq.artemis.core.config.Configuration;
+import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.postoffice.Binding;
 import org.apache.activemq.artemis.core.postoffice.BindingType;
 import 
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory;
@@ -58,7 +59,6 @@ import org.apache.activemq.artemis.core.security.Role;
 import org.apache.activemq.artemis.core.server.ActivateCallback;
 import org.apache.activemq.artemis.core.server.ActiveMQServer;
 import org.apache.activemq.artemis.core.server.ActiveMQServerLogger;
-import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.AddressInfo;
 import org.apache.activemq.artemis.core.server.management.Notification;
 import org.apache.activemq.artemis.core.server.reload.ReloadCallback;
@@ -113,7 +113,7 @@ import org.w3c.dom.NodeList;
 @Deprecated
 public class JMSServerManagerImpl implements JMSServerManager, 
ActivateCallback {
 
-   private static final String REJECT_FILTER = 
ActiveMQServerImpl.GENERIC_IGNORED_FILTER;
+   private static final String REJECT_FILTER = Filter.GENERIC_IGNORED_FILTER;
 
    private BindingRegistry registry;
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
index 51e917d..d600a7b 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/invm/InVMConnector.java
@@ -241,6 +241,7 @@ public class InVMConnector extends AbstractConnector {
             throw 
ActiveMQMessageBundle.BUNDLE.connectionExists(connection.getID());
          }
 
+         //noinspection deprecation
          if (listener instanceof ConnectionLifeCycleListener) {
             listener.connectionCreated(component, connection, 
protocol.getName());
          } else {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java
index 22b162c..6594515 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/HttpAcceptorHandler.java
@@ -31,7 +31,7 @@ import io.netty.channel.ChannelPromise;
 import io.netty.handler.codec.http.DefaultFullHttpResponse;
 import io.netty.handler.codec.http.FullHttpRequest;
 import io.netty.handler.codec.http.FullHttpResponse;
-import io.netty.handler.codec.http.HttpHeaders;
+import io.netty.handler.codec.http.HttpHeaderNames;
 import io.netty.handler.codec.http.HttpMethod;
 import io.netty.handler.codec.http.HttpResponseStatus;
 import io.netty.handler.codec.http.HttpVersion;
@@ -73,7 +73,7 @@ public class HttpAcceptorHandler extends ChannelDuplexHandler 
{
    @Override
    public void channelRead(final ChannelHandlerContext ctx, final Object msg) 
throws Exception {
       FullHttpRequest request = (FullHttpRequest) msg;
-      HttpMethod method = request.getMethod();
+      HttpMethod method = request.method();
       // if we are a post then we send upstream, otherwise we are just being 
prompted for a response.
       if (method.equals(HttpMethod.POST)) {
          ctx.fireChannelRead(ReferenceCountUtil.retain(((FullHttpRequest) 
msg).content()));
@@ -148,11 +148,11 @@ public class HttpAcceptorHandler extends 
ChannelDuplexHandler {
          while (responseHolder == null);
          if (!bogusResponse) {
             piggyBackResponses(responseHolder.response.content());
-            
responseHolder.response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, 
String.valueOf(responseHolder.response.content().readableBytes()));
+            
responseHolder.response.headers().set(HttpHeaderNames.CONTENT_LENGTH, 
String.valueOf(responseHolder.response.content().readableBytes()));
             channel.writeAndFlush(responseHolder.response, promise);
          } else {
             responseHolder.response.content().writeBytes(buffer);
-            
responseHolder.response.headers().set(HttpHeaders.Names.CONTENT_LENGTH, 
String.valueOf(responseHolder.response.content().readableBytes()));
+            
responseHolder.response.headers().set(HttpHeaderNames.CONTENT_LENGTH, 
String.valueOf(responseHolder.response.content().readableBytes()));
             channel.writeAndFlush(responseHolder.response, promise);
          }
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
index bc26776..d626fad 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/impl/netty/NettyAcceptor.java
@@ -46,6 +46,7 @@ import io.netty.channel.ChannelHandlerContext;
 import io.netty.channel.ChannelInitializer;
 import io.netty.channel.ChannelOption;
 import io.netty.channel.ChannelPipeline;
+import io.netty.channel.DefaultEventLoopGroup;
 import io.netty.channel.EventLoopGroup;
 import io.netty.channel.ServerChannel;
 import io.netty.channel.WriteBufferWaterMark;
@@ -55,7 +56,6 @@ import io.netty.channel.group.ChannelGroup;
 import io.netty.channel.group.ChannelGroupFuture;
 import io.netty.channel.group.DefaultChannelGroup;
 import io.netty.channel.local.LocalAddress;
-import io.netty.channel.local.LocalEventLoopGroup;
 import io.netty.channel.local.LocalServerChannel;
 import io.netty.channel.nio.NioEventLoopGroup;
 import io.netty.channel.socket.nio.NioServerSocketChannel;
@@ -300,7 +300,7 @@ public class NettyAcceptor extends AbstractAcceptor {
       if (useInvm) {
          acceptorType = INVM_ACCEPTOR_TYPE;
          channelClazz = LocalServerChannel.class;
-         eventLoopGroup = new LocalEventLoopGroup();
+         eventLoopGroup = new DefaultEventLoopGroup();
       } else {
 
          if (remotingThreads == -1) {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
index 7c9c675..a213e6d 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/remoting/server/impl/RemotingServiceImpl.java
@@ -499,7 +499,7 @@ public class RemotingServiceImpl implements 
RemotingService, ServerConnectionLif
       return connectionCountLatch;
    }
 
-   // ConnectionLifeCycleListener implementation 
-----------------------------------
+   // ServerConnectionLifeCycleListener implementation 
-----------------------------------
 
    private ProtocolManagerFactory getProtocolManager(String protocol) {
       return protocolMap.get(protocol);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/websocket/WebSocketServerHandler.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/websocket/WebSocketServerHandler.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/websocket/WebSocketServerHandler.java
index 56ece3e..8141852 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/websocket/WebSocketServerHandler.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/protocol/websocket/WebSocketServerHandler.java
@@ -29,7 +29,7 @@ import io.netty.channel.SimpleChannelInboundHandler;
 import io.netty.handler.codec.http.DefaultFullHttpResponse;
 import io.netty.handler.codec.http.FullHttpRequest;
 import io.netty.handler.codec.http.FullHttpResponse;
-import io.netty.handler.codec.http.HttpHeaders;
+import io.netty.handler.codec.http.HttpHeaderNames;
 import io.netty.handler.codec.http.HttpRequest;
 import io.netty.handler.codec.http.websocketx.BinaryWebSocketFrame;
 import io.netty.handler.codec.http.websocketx.CloseWebSocketFrame;
@@ -41,8 +41,8 @@ import 
io.netty.handler.codec.http.websocketx.WebSocketServerHandshaker;
 import io.netty.handler.codec.http.websocketx.WebSocketServerHandshakerFactory;
 import org.apache.activemq.artemis.utils.StringUtil;
 
-import static io.netty.handler.codec.http.HttpHeaders.isKeepAlive;
-import static io.netty.handler.codec.http.HttpHeaders.setContentLength;
+import static io.netty.handler.codec.http.HttpUtil.isKeepAlive;
+import static io.netty.handler.codec.http.HttpUtil.setContentLength;
 import static io.netty.handler.codec.http.HttpMethod.GET;
 import static io.netty.handler.codec.http.HttpResponseStatus.FORBIDDEN;
 import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
@@ -75,7 +75,7 @@ public class WebSocketServerHandler extends 
SimpleChannelInboundHandler<Object>
 
    private void handleHttpRequest(ChannelHandlerContext ctx, FullHttpRequest 
req) throws Exception {
       // Allow only GET methods.
-      if (req.getMethod() != GET) {
+      if (req.method() != GET) {
          sendHttpResponse(ctx, req, new DefaultFullHttpResponse(HTTP_1_1, 
FORBIDDEN));
          return;
       }
@@ -123,14 +123,14 @@ public class WebSocketServerHandler extends 
SimpleChannelInboundHandler<Object>
 
    private void sendHttpResponse(ChannelHandlerContext ctx, HttpRequest req, 
FullHttpResponse res) {
       // Generate an error page if response status code is not OK (200).
-      if (res.getStatus().code() != 200) {
-         
res.content().writeBytes(res.getStatus().toString().getBytes(StandardCharsets.UTF_8));
+      if (res.status().code() != 200) {
+         
res.content().writeBytes(res.status().toString().getBytes(StandardCharsets.UTF_8));
          setContentLength(res, res.content().readableBytes());
       }
 
       // Send the response and close the connection if necessary.
       ChannelFuture f = ctx.writeAndFlush(res);
-      if (!isKeepAlive(req) || res.getStatus().code() != 200) {
+      if (!isKeepAlive(req) || res.status().code() != 200) {
          f.addListener(ChannelFutureListener.CLOSE);
       }
    }
@@ -142,7 +142,7 @@ public class WebSocketServerHandler extends 
SimpleChannelInboundHandler<Object>
    }
 
    private String getWebSocketLocation(HttpRequest req) {
-      return "ws://" + req.headers().get(HttpHeaders.Names.HOST) + 
WEBSOCKET_PATH;
+      return "ws://" + req.headers().get(HttpHeaderNames.HOST) + 
WEBSOCKET_PATH;
    }
 
    public HttpRequest getHttpRequest() {

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java
----------------------------------------------------------------------
diff --git 
a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java
 
b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java
index 43d9b28..9eff9f8 100644
--- 
a/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java
+++ 
b/artemis-web/src/test/java/org/apache/activemq/cli/test/WebServerComponentTest.java
@@ -36,7 +36,7 @@ import io.netty.channel.socket.nio.NioSocketChannel;
 import io.netty.handler.codec.http.DefaultFullHttpRequest;
 import io.netty.handler.codec.http.HttpClientCodec;
 import io.netty.handler.codec.http.HttpContent;
-import io.netty.handler.codec.http.HttpHeaders;
+import io.netty.handler.codec.http.HttpHeaderNames;
 import io.netty.handler.codec.http.HttpMethod;
 import io.netty.handler.codec.http.HttpObject;
 import io.netty.handler.codec.http.HttpRequest;
@@ -100,7 +100,7 @@ public class WebServerComponentTest extends Assert {
       URI uri = new URI(URL);
       // Prepare the HTTP request.
       HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, 
HttpMethod.GET, uri.getRawPath());
-      request.headers().set(HttpHeaders.Names.HOST, "localhost");
+      request.headers().set(HttpHeaderNames.HOST, "localhost");
 
       // Send the HTTP request.
       ch.writeAndFlush(request);
@@ -137,7 +137,7 @@ public class WebServerComponentTest extends Assert {
       URI uri = new URI(URL);
       // Prepare the HTTP request.
       HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, 
HttpMethod.GET, uri.getRawPath());
-      request.headers().set(HttpHeaders.Names.HOST, "localhost");
+      request.headers().set(HttpHeaderNames.HOST, "localhost");
 
       // Send the HTTP request.
       ch.writeAndFlush(request);
@@ -193,7 +193,7 @@ public class WebServerComponentTest extends Assert {
       URI uri = new URI(SECURE_URL);
       // Prepare the HTTP request.
       HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, 
HttpMethod.GET, uri.getRawPath());
-      request.headers().set(HttpHeaders.Names.HOST, "localhost");
+      request.headers().set(HttpHeaderNames.HOST, "localhost");
 
       // Send the HTTP request.
       ch.writeAndFlush(request);
@@ -247,7 +247,7 @@ public class WebServerComponentTest extends Assert {
       URI uri = new URI(SECURE_URL);
       // Prepare the HTTP request.
       HttpRequest request = new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, 
HttpMethod.GET, uri.getRawPath());
-      request.headers().set(HttpHeaders.Names.HOST, "localhost");
+      request.headers().set(HttpHeaderNames.HOST, "localhost");
 
       // Send the HTTP request.
       ch.writeAndFlush(request);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
index da695ca..2fa89fb 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/client/HangConsumerTest.java
@@ -445,7 +445,7 @@ public class HangConsumerTest extends ActiveMQTestBase {
       try {
          for (int i = 0; i < 5; i++) {
             if (server.locateQueue(SimpleString.toSimpleString("tt")) == null) 
{
-               server.createQueue(SimpleString.toSimpleString("tt"), 
RoutingType.ANYCAST, SimpleString.toSimpleString("tt"), 
SimpleString.toSimpleString(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), true, 
false);
+               server.createQueue(SimpleString.toSimpleString("tt"), 
RoutingType.ANYCAST, SimpleString.toSimpleString("tt"), 
SimpleString.toSimpleString(Filter.GENERIC_IGNORED_FILTER), true, false);
             }
 
             server.stop();

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
index 63743ed..532207e 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/jms/client/TopicCleanupTest.java
@@ -28,6 +28,7 @@ import javax.jms.Topic;
 
 import org.apache.activemq.artemis.api.core.SimpleString;
 import org.apache.activemq.artemis.api.jms.ActiveMQJMSClient;
+import org.apache.activemq.artemis.core.filter.Filter;
 import org.apache.activemq.artemis.core.filter.impl.FilterImpl;
 import org.apache.activemq.artemis.core.persistence.StorageManager;
 import org.apache.activemq.artemis.core.postoffice.Binding;
@@ -35,7 +36,6 @@ import org.apache.activemq.artemis.core.postoffice.Bindings;
 import org.apache.activemq.artemis.core.postoffice.impl.BindingsImpl;
 import org.apache.activemq.artemis.core.postoffice.impl.LocalQueueBinding;
 import org.apache.activemq.artemis.core.server.Queue;
-import org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl;
 import org.apache.activemq.artemis.core.server.impl.QueueImpl;
 import org.apache.activemq.artemis.jms.client.ActiveMQTopic;
 import org.apache.activemq.artemis.tests.util.JMSTestBase;
@@ -84,7 +84,7 @@ public class TopicCleanupTest extends JMSTestBase {
 
             final Queue queue = new QueueImpl(storage.generateID(), 
SimpleString.toSimpleString("topic"),
                                               
SimpleString.toSimpleString("topic"),
-                                              
FilterImpl.createFilter(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), null,
+                                              
FilterImpl.createFilter(Filter.GENERIC_IGNORED_FILTER), null,
                                               true, false, false, 
server.getScheduledPool(), server.getPostOffice(),
                                               storage, 
server.getAddressSettingsRepository(),
                                               
server.getExecutorFactory().getExecutor(), server);

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
index ddabf1b..3cb605b 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/paging/PagingTest.java
@@ -1748,7 +1748,7 @@ public class PagingTest extends ActiveMQTestBase {
       ClientSession session = sf.createSession(false, false, false);
 
       session.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true);
-      session.createQueue(PagingTest.ADDRESS, 
PagingTest.ADDRESS.concat("-invalid"), new 
SimpleString(ActiveMQServerImpl.GENERIC_IGNORED_FILTER), true);
+      session.createQueue(PagingTest.ADDRESS, 
PagingTest.ADDRESS.concat("-invalid"), new 
SimpleString(Filter.GENERIC_IGNORED_FILTER), true);
 
       ClientProducer producer = session.createProducer(PagingTest.ADDRESS);
 

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java
----------------------------------------------------------------------
diff --git 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java
 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java
index 0f08ecd..d0f98db 100644
--- 
a/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java
+++ 
b/tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/transports/netty/NettyConnectorWithHTTPUpgradeTest.java
@@ -63,7 +63,7 @@ import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
 
-import static io.netty.handler.codec.http.HttpHeaders.Names.UPGRADE;
+import static io.netty.handler.codec.http.HttpHeaderNames.UPGRADE;
 import static 
io.netty.handler.codec.http.HttpResponseStatus.SWITCHING_PROTOCOLS;
 import static io.netty.handler.codec.http.HttpVersion.HTTP_1_1;
 import static 
org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnector.MAGIC_NUMBER;

http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/ad228e20/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java
----------------------------------------------------------------------
diff --git 
a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java
 
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java
index 5b60ef0..d302be7 100644
--- 
a/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java
+++ 
b/tests/unit-tests/src/test/java/org/apache/activemq/artemis/tests/unit/core/remoting/impl/netty/NettyConnectorTest.java
@@ -36,6 +36,26 @@ import org.junit.Test;
 
 public class NettyConnectorTest extends ActiveMQTestBase {
 
+   private ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
+      @Override
+      public void connectionException(final Object connectionID, final 
ActiveMQException me) {
+      }
+
+      @Override
+      public void connectionDestroyed(final Object connectionID) {
+      }
+
+      @Override
+      public void connectionCreated(final ActiveMQComponent component,
+                                    final Connection connection,
+                                    final ClientProtocolManager protocol) {
+      }
+
+      @Override
+      public void connectionReadyForWrites(Object connectionID, boolean ready) 
{
+      }
+   };
+
    @Test
    public void testStartStop() throws Exception {
       BufferHandler handler = new BufferHandler() {
@@ -44,25 +64,6 @@ public class NettyConnectorTest extends ActiveMQTestBase {
          }
       };
       Map<String, Object> params = new HashMap<>();
-      ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
-         @Override
-         public void connectionException(final Object connectionID, final 
ActiveMQException me) {
-         }
-
-         @Override
-         public void connectionDestroyed(final Object connectionID) {
-         }
-
-         @Override
-         public void connectionCreated(final ActiveMQComponent component,
-                                       final Connection connection,
-                                       final ClientProtocolManager protocol) {
-         }
-
-         @Override
-         public void connectionReadyForWrites(Object connectionID, boolean 
ready) {
-         }
-      };
 
       NettyConnector connector = new NettyConnector(params, handler, listener, 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newScheduledThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory()));
 
@@ -80,25 +81,6 @@ public class NettyConnectorTest extends ActiveMQTestBase {
          }
       };
       Map<String, Object> params = new HashMap<>();
-      ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
-         @Override
-         public void connectionException(final Object connectionID, final 
ActiveMQException me) {
-         }
-
-         @Override
-         public void connectionDestroyed(final Object connectionID) {
-         }
-
-         @Override
-         public void connectionCreated(final ActiveMQComponent component,
-                                       final Connection connection,
-                                       final ClientProtocolManager protocol) {
-         }
-
-         @Override
-         public void connectionReadyForWrites(Object connectionID, boolean 
ready) {
-         }
-      };
 
       try {
          new NettyConnector(params, null, listener, 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newScheduledThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory()));
@@ -130,25 +112,6 @@ public class NettyConnectorTest extends ActiveMQTestBase {
       params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, "bad 
password");
       params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path");
       params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad 
password");
-      ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
-         @Override
-         public void connectionException(final Object connectionID, final 
ActiveMQException me) {
-         }
-
-         @Override
-         public void connectionDestroyed(final Object connectionID) {
-         }
-
-         @Override
-         public void connectionCreated(final ActiveMQComponent component,
-                                       final Connection connection,
-                                       final ClientProtocolManager protocol) {
-         }
-
-         @Override
-         public void connectionReadyForWrites(Object connectionID, boolean 
ready) {
-         }
-      };
 
       NettyConnector connector = new NettyConnector(params, handler, listener, 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newScheduledThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory()));
 
@@ -176,25 +139,6 @@ public class NettyConnectorTest extends ActiveMQTestBase {
       params.put(TransportConstants.KEYSTORE_PASSWORD_PROP_NAME, "bad 
password");
       params.put(TransportConstants.TRUSTSTORE_PATH_PROP_NAME, "bad path");
       params.put(TransportConstants.TRUSTSTORE_PASSWORD_PROP_NAME, "bad 
password");
-      ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
-         @Override
-         public void connectionException(final Object connectionID, final 
ActiveMQException me) {
-         }
-
-         @Override
-         public void connectionDestroyed(final Object connectionID) {
-         }
-
-         @Override
-         public void connectionCreated(final ActiveMQComponent component,
-                                       final Connection connection,
-                                       final ClientProtocolManager protocol) {
-         }
-
-         @Override
-         public void connectionReadyForWrites(Object connectionID, boolean 
ready) {
-         }
-      };
 
       NettyConnector connector = new NettyConnector(params, handler, listener, 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newScheduledThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory()));
 
@@ -224,25 +168,6 @@ public class NettyConnectorTest extends ActiveMQTestBase {
       Map<String, Object> params = new HashMap<>();
       params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
       params.put(TransportConstants.ENABLED_CIPHER_SUITES_PROP_NAME, 
"myBadCipherSuite");
-      ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
-         @Override
-         public void connectionException(final Object connectionID, final 
ActiveMQException me) {
-         }
-
-         @Override
-         public void connectionDestroyed(final Object connectionID) {
-         }
-
-         @Override
-         public void connectionCreated(final ActiveMQComponent component,
-                                       final Connection connection,
-                                       final ClientProtocolManager protocol) {
-         }
-
-         @Override
-         public void connectionReadyForWrites(Object connectionID, boolean 
ready) {
-         }
-      };
 
       NettyConnector connector = new NettyConnector(params, handler, listener, 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newScheduledThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory()));
 
@@ -263,25 +188,6 @@ public class NettyConnectorTest extends ActiveMQTestBase {
       Map<String, Object> params = new HashMap<>();
       params.put(TransportConstants.SSL_ENABLED_PROP_NAME, true);
       params.put(TransportConstants.ENABLED_PROTOCOLS_PROP_NAME, 
"myBadProtocol");
-      ClientConnectionLifeCycleListener listener = new 
ClientConnectionLifeCycleListener() {
-         @Override
-         public void connectionException(final Object connectionID, final 
ActiveMQException me) {
-         }
-
-         @Override
-         public void connectionDestroyed(final Object connectionID) {
-         }
-
-         @Override
-         public void connectionCreated(final ActiveMQComponent component,
-                                       final Connection connection,
-                                       final ClientProtocolManager protocol) {
-         }
-
-         @Override
-         public void connectionReadyForWrites(Object connectionID, boolean 
ready) {
-         }
-      };
 
       NettyConnector connector = new NettyConnector(params, handler, listener, 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newCachedThreadPool(ActiveMQThreadFactory.defaultThreadFactory()), 
Executors.newScheduledThreadPool(5, 
ActiveMQThreadFactory.defaultThreadFactory()));
 

Reply via email to