Removing dead code - AMQPBrokerStoppedException
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/12de3589 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/12de3589 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/12de3589 Branch: refs/heads/master Commit: 12de35892a1ce23713eed61d0cf3c873330018ef Parents: 04ca86c Author: Clebert Suconic <[email protected]> Authored: Fri Aug 28 14:32:50 2015 -0400 Committer: Clebert Suconic <[email protected]> Committed: Fri Aug 28 15:05:42 2015 -0400 ---------------------------------------------------------------------- .../protocol/openwire/OpenWireConnection.java | 23 ----------- .../openwire/amq/AMQBrokerStoppedException.java | 40 -------------------- 2 files changed, 63 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/12de3589/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java ---------------------------------------------------------------------- diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java index a489a93..bcd345a 100644 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java +++ b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/OpenWireConnection.java @@ -39,7 +39,6 @@ import org.apache.activemq.artemis.api.core.ActiveMQBuffers; import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.api.core.ActiveMQNonExistentQueueException; import org.apache.activemq.artemis.api.core.ActiveMQSecurityException; -import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQBrokerStoppedException; import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQCompositeConsumerBrokerExchange; import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConnectionContext; import org.apache.activemq.artemis.core.protocol.openwire.amq.AMQConsumer; @@ -635,28 +634,6 @@ public class OpenWireConnection implements RemotingConnection, CommandVisitor, S if (e instanceof IOException) { serviceTransportException((IOException) e); } - else if (e.getClass() == AMQBrokerStoppedException.class) { - // Handle the case where the broker is stopped - // But the client is still connected. - if (!stopping.get()) { - ConnectionError ce = new ConnectionError(); - ce.setException(e); - dispatchSync(ce); - // Record the error that caused the transport to stop - this.stopError = e; - // Wait a little bit to try to get the output buffer to flush - // the exception notification to the client. - try { - Thread.sleep(500); - } - catch (InterruptedException ie) { - Thread.currentThread().interrupt(); - } - // Worst case is we just kill the connection before the - // notification gets to him. - stopAsync(); - } - } else if (!stopping.get() && !inServiceException) { inServiceException = true; try { http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/12de3589/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQBrokerStoppedException.java ---------------------------------------------------------------------- diff --git a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQBrokerStoppedException.java b/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQBrokerStoppedException.java deleted file mode 100644 index b82ccdd..0000000 --- a/artemis-protocols/artemis-openwire-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/openwire/amq/AMQBrokerStoppedException.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.activemq.artemis.core.protocol.openwire.amq; - -public class AMQBrokerStoppedException extends IllegalStateException { - - private static final long serialVersionUID = -7543507221414251115L; - - public AMQBrokerStoppedException() { - super(); - } - - public AMQBrokerStoppedException(String message, Throwable cause) { - super(message); - initCause(cause); - } - - public AMQBrokerStoppedException(String s) { - super(s); - } - - public AMQBrokerStoppedException(Throwable cause) { - initCause(cause); - } - -}
