qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oru...@apache.org
Subject [4/4] qpid-broker-j git commit: QPID-7531: [Java Broker, AMQP 1.0] Code clean-up
Date Fri, 06 Oct 2017 14:48:21 GMT
 QPID-7531: [Java Broker, AMQP 1.0] Code clean-up


Project: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/commit/024f9a21
Tree: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/tree/024f9a21
Diff: http://git-wip-us.apache.org/repos/asf/qpid-broker-j/diff/024f9a21

Branch: refs/heads/master
Commit: 024f9a21a2a630ee9bd1d4ec20904ef764c0aeb1
Parents: 826ff45
Author: Alex Rudyy <orudyy@apache.org>
Authored: Fri Oct 6 15:33:29 2017 +0100
Committer: Alex Rudyy <orudyy@apache.org>
Committed: Fri Oct 6 15:33:30 2017 +0100

----------------------------------------------------------------------
 .../protocol/v1_0/AMQPConnection_1_0Impl.java   |  40 +++---
 .../v1_0/AbstractReceivingLinkEndpoint.java     |   1 -
 .../protocol/v1_0/ConsumerTarget_1_0.java       |   9 +-
 .../qpid/server/protocol/v1_0/Container.java    |   2 +-
 .../protocol/v1_0/DeserializationFactories.java |   7 +-
 .../protocol/v1_0/ErrantLinkEndpoint.java       |   2 +-
 .../v1_0/ExchangeSendingDestination.java        |   2 +-
 .../protocol/v1_0/IdentifiedTransaction.java    |  34 ++---
 .../server/protocol/v1_0/LinkRegistryImpl.java  |   4 -
 .../v1_0/MessageConverter_Internal_to_v1_0.java |   4 +-
 .../v1_0/MessageConverter_from_1_0.java         | 135 ++++++++++---------
 .../protocol/v1_0/MessageConverter_to_1_0.java  |   6 +-
 .../v1_0/MessageConverter_v1_0_to_Internal.java |  81 +++--------
 .../server/protocol/v1_0/MessageFormat_1_0.java |   3 +-
 .../protocol/v1_0/MessageMetaData_1_0.java      |   2 +-
 .../qpid/server/protocol/v1_0/Message_1_0.java  |   4 +-
 .../protocol/v1_0/NodeReceivingDestination.java |   6 +-
 .../v1_0/ProtocolEngineCreator_1_0_0.java       |   2 +-
 .../v1_0/ProtocolEngineCreator_1_0_0_SASL.java  |   2 +-
 .../protocol/v1_0/SendingLinkEndpoint.java      |   7 +-
 .../server/protocol/v1_0/SequenceNumber.java    |   7 +-
 .../qpid/server/protocol/v1_0/SessionState.java |   2 +-
 .../qpid/server/protocol/v1_0/Session_1_0.java  |  10 +-
 .../v1_0/StandardReceivingLinkEndpoint.java     |   1 -
 .../TxnCoordinatorReceivingLinkEndpoint.java    |   4 +-
 .../codec/AbstractDescribedTypeConstructor.java |   6 +-
 .../v1_0/codec/ArrayTypeConstructor.java        |   4 +-
 .../v1_0/codec/BinaryTypeConstructor.java       |   5 +-
 .../protocol/v1_0/codec/BinaryWriter.java       |   2 +-
 .../protocol/v1_0/codec/BooleanConstructor.java |   3 +-
 .../protocol/v1_0/codec/BooleanWriter.java      |   2 +-
 .../protocol/v1_0/codec/ByteArrayWriter.java    |   2 +-
 .../server/protocol/v1_0/codec/ByteWriter.java  |   2 +-
 .../server/protocol/v1_0/codec/CharWriter.java  |   2 +-
 .../v1_0/codec/CompoundTypeAssembler.java       |  36 -----
 .../protocol/v1_0/codec/CompoundWriter.java     |   2 +-
 .../protocol/v1_0/codec/DecimalConstructor.java |   4 +-
 .../codec/DefaultDescribedTypeConstructor.java  |   2 +-
 .../v1_0/codec/DelegatingValueWriter.java       |   2 +-
 .../v1_0/codec/DescribedTypeConstructor.java    |   2 +-
 .../protocol/v1_0/codec/DoubleWriter.java       |   2 +-
 .../protocol/v1_0/codec/FixedEightWriter.java   |   4 +-
 .../protocol/v1_0/codec/FixedFourWriter.java    |   4 +-
 .../protocol/v1_0/codec/FixedSixteenWriter.java |   2 +-
 .../protocol/v1_0/codec/FixedTwoWriter.java     |   2 +-
 .../server/protocol/v1_0/codec/FloatWriter.java |   2 +-
 .../protocol/v1_0/codec/IntegerWriter.java      |   2 +-
 .../protocol/v1_0/codec/ListConstructor.java    |  18 +--
 .../server/protocol/v1_0/codec/ListWriter.java  |   4 +-
 .../server/protocol/v1_0/codec/LongWriter.java  |   2 +-
 .../protocol/v1_0/codec/MapConstructor.java     |   4 +-
 .../server/protocol/v1_0/codec/MapWriter.java   |   2 +-
 .../v1_0/codec/NullTypeConstructor.java         |   1 -
 .../server/protocol/v1_0/codec/NullWriter.java  |   2 +-
 .../v1_0/codec/RestrictedTypeValueWriter.java   |   6 +-
 .../server/protocol/v1_0/codec/ShortWriter.java |   2 +-
 .../v1_0/codec/SimpleVariableWidthWriter.java   |   2 +-
 .../protocol/v1_0/codec/StringWriter.java       |   2 +-
 .../protocol/v1_0/codec/SymbolArrayWriter.java  |   2 +-
 .../protocol/v1_0/codec/SymbolWriter.java       |   4 +-
 .../protocol/v1_0/codec/TimestampWriter.java    |   2 +-
 .../server/protocol/v1_0/codec/UUIDWriter.java  |   2 +-
 .../protocol/v1_0/codec/UnsignedByteWriter.java |   2 +-
 .../v1_0/codec/UnsignedIntegerWriter.java       |   2 +-
 .../protocol/v1_0/codec/UnsignedLongWriter.java |   2 +-
 .../v1_0/codec/UnsignedShortWriter.java         |   2 +-
 .../protocol/v1_0/codec/ValueHandler.java       |   3 +-
 .../codec/ValueProducingProtocolHandler.java    |   4 +-
 .../server/protocol/v1_0/codec/ValueWriter.java |   8 +-
 .../codec/VariableWidthTypeConstructor.java     |   2 +-
 .../v1_0/codec/ZeroListConstructor.java         |   1 -
 .../v1_0/codec/ZeroUIntConstructor.java         |   1 -
 .../v1_0/codec/ZeroULongConstructor.java        |   1 -
 .../server/protocol/v1_0/framing/AMQFrame.java  |   2 +-
 .../v1_0/framing/OversizeFrameException.java    |   2 +-
 .../v1_0/messaging/SectionDecoderImpl.java      |   2 +-
 .../v1_0/messaging/SectionEncoderImpl.java      |   2 +-
 .../protocol/v1_0/store/LinkStoreUtils.java     |   2 +-
 .../protocol/v1_0/type/ErrorCondition.java      |   2 +-
 .../server/protocol/v1_0/type/UnsignedByte.java |   7 +-
 .../protocol/v1_0/type/UnsignedInteger.java     |   7 +-
 .../server/protocol/v1_0/type/UnsignedLong.java |   7 +-
 .../protocol/v1_0/type/UnsignedShort.java       |   7 +-
 .../type/codec/AMQPDescribedTypeRegistry.java   |   6 +-
 .../soleconn/SoleConnectionDetectionPolicy.java |   2 +-
 .../SoleConnectionEnforcementPolicy.java        |   2 +-
 .../v1_0/type/messaging/ExactSubjectFilter.java |   7 +-
 .../v1_0/type/messaging/JMSSelectorFilter.java  |   7 +-
 .../type/messaging/MatchingSubjectFilter.java   |   7 +-
 .../type/messaging/codec/AcceptedWriter.java    |   2 +-
 .../messaging/codec/AmqpSequenceWriter.java     |   2 +-
 .../codec/AmqpValueSectionConstructor.java      |   1 -
 .../type/messaging/codec/AmqpValueWriter.java   |   2 +-
 .../codec/ApplicationPropertiesWriter.java      |   2 +-
 .../v1_0/type/messaging/codec/DataWriter.java   |   2 +-
 .../messaging/codec/DeleteOnCloseWriter.java    |   2 +-
 .../codec/DeleteOnNoLinksOrMessagesWriter.java  |   2 +-
 .../messaging/codec/DeleteOnNoLinksWriter.java  |   2 +-
 .../codec/DeleteOnNoMessagesWriter.java         |   2 +-
 .../codec/DeliveryAnnotationsWriter.java        |   2 +-
 .../codec/DescribedListSectionConstructor.java  |   1 -
 .../codec/ExactSubjectFilterWriter.java         |   2 +-
 .../v1_0/type/messaging/codec/FooterWriter.java |   2 +-
 .../v1_0/type/messaging/codec/HeaderWriter.java |   2 +-
 .../codec/JMSSelectorFilterWriter.java          |   2 +-
 .../codec/MatchingSubjectFilterWriter.java      |   2 +-
 .../codec/MessageAnnotationsWriter.java         |   2 +-
 .../type/messaging/codec/ModifiedWriter.java    |   2 +-
 .../messaging/codec/NoLocalFilterWriter.java    |   2 +-
 .../type/messaging/codec/PropertiesWriter.java  |   2 +-
 .../type/messaging/codec/ReceivedWriter.java    |   2 +-
 .../type/messaging/codec/RejectedWriter.java    |   2 +-
 .../type/messaging/codec/ReleasedWriter.java    |   2 +-
 .../v1_0/type/messaging/codec/SourceWriter.java |   2 +-
 .../v1_0/type/messaging/codec/TargetWriter.java |   2 +-
 .../security/codec/SaslChallengeWriter.java     |   4 +-
 .../type/security/codec/SaslInitWriter.java     |   2 +-
 .../security/codec/SaslMechanismsWriter.java    |   2 +-
 .../type/security/codec/SaslOutcomeWriter.java  |   2 +-
 .../type/security/codec/SaslResponseWriter.java |   6 +-
 .../transaction/codec/CoordinatorWriter.java    |   2 +-
 .../type/transaction/codec/DeclareWriter.java   |   2 +-
 .../type/transaction/codec/DeclaredWriter.java  |   2 +-
 .../type/transaction/codec/DischargeWriter.java |   4 +-
 .../codec/TransactionalStateWriter.java         |   2 +-
 .../protocol/v1_0/type/transport/Attach.java    |   2 +-
 .../v1_0/type/transport/codec/AttachWriter.java |   2 +-
 .../v1_0/type/transport/codec/BeginWriter.java  |   2 +-
 .../v1_0/type/transport/codec/CloseWriter.java  |   2 +-
 .../v1_0/type/transport/codec/DetachWriter.java |   2 +-
 .../type/transport/codec/DispositionWriter.java |   2 +-
 .../v1_0/type/transport/codec/EndWriter.java    |   2 +-
 .../v1_0/type/transport/codec/ErrorWriter.java  |   2 +-
 .../v1_0/type/transport/codec/FlowWriter.java   |   2 +-
 .../v1_0/type/transport/codec/OpenWriter.java   |   2 +-
 .../type/transport/codec/TransferWriter.java    |   2 +-
 .../protocol/v1_0/ConsumerTarget_1_0Test.java   |  12 +-
 .../server/protocol/v1_0/LinkRegistryTest.java  |   5 +-
 .../MessageConverter_Internal_to_1_0Test.java   |   2 -
 .../MessageConverter_v1_0_to_InternalTest.java  |   3 +-
 .../PropertyConverter_Internal_to_v1_0Test.java |   2 +-
 .../protocol/v1_0/ProtocolEngine_1_0_0Test.java |  26 +---
 .../server/protocol/v1_0/Session_1_0Test.java   |  17 +--
 .../protocol/v1_0/codec/ValueHandlerTest.java   |   5 +-
 .../MessageConverter_0_10_to_1_0.java           |   2 +-
 .../v0_8_v1_0/MessageConverter_0_8_to_1_0.java  |   2 +-
 146 files changed, 314 insertions(+), 487 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
index 04db60a..97a3081 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AMQPConnection_1_0Impl.java
@@ -141,7 +141,7 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
                    AMQPConnection_1_0<AMQPConnection_1_0Impl>
 {
 
-    private static Logger LOGGER = LoggerFactory.getLogger(AMQPConnection_1_0Impl.class);
+    private static final Logger LOGGER = LoggerFactory.getLogger(AMQPConnection_1_0Impl.class);
     private static final Logger FRAME_LOGGER = LoggerFactory.getLogger("org.apache.qpid.server.protocol.frame");
 
     private final AtomicBoolean _stateChanged = new AtomicBoolean();
@@ -172,7 +172,7 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
                     (byte) 0
             };
 
-    private FrameWriter _frameWriter;
+    private final FrameWriter _frameWriter;
     private ProtocolHandler _frameHandler;
     private volatile boolean _transportBlockedForWriting;
     private volatile SubjectAuthenticationResult _successfulAuthenticationResult;
@@ -182,7 +182,7 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
     private SoleConnectionEnforcementPolicy _soleConnectionEnforcementPolicy;
 
     private static final int CONNECTION_CONTROL_CHANNEL = 0;
-    private SubjectCreator _subjectCreator;
+    private final SubjectCreator _subjectCreator;
 
     private int _channelMax = 0;
     private int _maxFrameSize = 4096;
@@ -203,12 +203,12 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
 
     private volatile ConnectionState _connectionState = ConnectionState.AWAIT_AMQP_OR_SASL_HEADER;
 
-    private AMQPDescribedTypeRegistry _describedTypeRegistry = AMQPDescribedTypeRegistry.newInstance()
-                                                                                        .registerTransportLayer()
-                                                                                        .registerMessagingLayer()
-                                                                                        .registerTransactionLayer()
-                                                                                        .registerSecurityLayer()
-                                                                                        .registerExtensionSoleconnLayer();
+    private final AMQPDescribedTypeRegistry _describedTypeRegistry = AMQPDescribedTypeRegistry.newInstance()
+                                                                                              .registerTransportLayer()
+                                                                                              .registerMessagingLayer()
+                                                                                              .registerTransactionLayer()
+                                                                                              .registerSecurityLayer()
+                                                                                              .registerExtensionSoleconnLayer();
 
     private final Map<Symbol, Object> _properties = new LinkedHashMap<>();
     private volatile boolean _saslComplete;
@@ -218,8 +218,6 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
 
     private static final long MINIMUM_SUPPORTED_IDLE_TIMEOUT = 1000L;
 
-    private volatile Map<Symbol, Object> _remoteProperties;
-
     private Set<Symbol> _remoteDesiredCapabilities;
 
     private final AtomicBoolean _orderlyClose = new AtomicBoolean(false);
@@ -833,24 +831,26 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
         {
             _outgoingIdleTimeout = open.getIdleTimeOut().longValue();
         }
-        _remoteProperties = open.getProperties() == null ? Collections.emptyMap() : Collections.unmodifiableMap(new LinkedHashMap<>(open.getProperties()));
+        final Map<Symbol, Object> remoteProperties = open.getProperties() == null
+                ? Collections.emptyMap()
+                : Collections.unmodifiableMap(new LinkedHashMap<>(open.getProperties()));
         _remoteDesiredCapabilities = open.getDesiredCapabilities() == null ? Collections.emptySet() : Sets.newHashSet(open.getDesiredCapabilities());
-        if (_remoteProperties.containsKey(Symbol.valueOf("product")))
+        if (remoteProperties.containsKey(Symbol.valueOf("product")))
         {
-            setClientProduct(_remoteProperties.get(Symbol.valueOf("product")).toString());
+            setClientProduct(remoteProperties.get(Symbol.valueOf("product")).toString());
         }
-        if (_remoteProperties.containsKey(Symbol.valueOf("version")))
+        if (remoteProperties.containsKey(Symbol.valueOf("version")))
         {
-            setClientVersion(_remoteProperties.get(Symbol.valueOf("version")).toString());
+            setClientVersion(remoteProperties.get(Symbol.valueOf("version")).toString());
         }
         setClientId(_remoteContainerId);
         if (_remoteDesiredCapabilities.contains(SoleConnectionConnectionProperties.SOLE_CONNECTION_FOR_CONTAINER))
         {
-            if (_remoteProperties != null && _remoteProperties.containsKey(SOLE_CONNECTION_ENFORCEMENT_POLICY))
+            if (remoteProperties != null && remoteProperties.containsKey(SOLE_CONNECTION_ENFORCEMENT_POLICY))
             {
                 try
                 {
-                    _soleConnectionEnforcementPolicy = SoleConnectionEnforcementPolicy.valueOf(_remoteProperties.get(
+                    _soleConnectionEnforcementPolicy = SoleConnectionEnforcementPolicy.valueOf(remoteProperties.get(
                             SOLE_CONNECTION_ENFORCEMENT_POLICY));
                 }
                 catch (IllegalArgumentException e)
@@ -910,12 +910,12 @@ public class AMQPConnection_1_0Impl extends AbstractAMQPConnection<AMQPConnectio
                     boolean registerSucceeded = addressSpace.registerConnection(this, (existingConnections, newConnection) ->
                     {
                         boolean proceedWithRegistration = true;
-                        if (newConnection instanceof AMQPConnection_1_0Impl && !((AMQPConnection_1_0Impl) newConnection).isClosing())
+                        if (newConnection instanceof AMQPConnection_1_0Impl && !newConnection.isClosing())
                         {
                             List<ListenableFuture<Void>> rescheduleFutures = new ArrayList<>();
                             for (AMQPConnection<?> existingConnection : StreamSupport.stream(existingConnections.spliterator(), false)
                                                                                      .filter(con -> con instanceof AMQPConnection_1_0)
-                                                                                     .filter(con -> !((AMQPConnection_1_0<?>) con).isClosing())
+                                                                                     .filter(con -> !con.isClosing())
                                                                                      .filter(con -> con.getRemoteContainerName().equals(newConnection.getRemoteContainerName()))
                                                                                      .collect(Collectors.toList()))
                             {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AbstractReceivingLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AbstractReceivingLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AbstractReceivingLinkEndpoint.java
index bdb97c1..5cc329d 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AbstractReceivingLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/AbstractReceivingLinkEndpoint.java
@@ -34,7 +34,6 @@ import org.apache.qpid.server.protocol.v1_0.type.DeliveryState;
 import org.apache.qpid.server.protocol.v1_0.type.Outcome;
 import org.apache.qpid.server.protocol.v1_0.type.Symbol;
 import org.apache.qpid.server.protocol.v1_0.type.UnsignedInteger;
-import org.apache.qpid.server.protocol.v1_0.type.messaging.Rejected;
 import org.apache.qpid.server.protocol.v1_0.type.messaging.Source;
 import org.apache.qpid.server.protocol.v1_0.type.transaction.TransactionError;
 import org.apache.qpid.server.protocol.v1_0.type.transaction.TransactionalState;

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ConsumerTarget_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ConsumerTarget_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ConsumerTarget_1_0.java
index 094164c..92237a0 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ConsumerTarget_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ConsumerTarget_1_0.java
@@ -40,13 +40,10 @@ import org.apache.qpid.server.message.ServerMessage;
 import org.apache.qpid.server.model.Queue;
 import org.apache.qpid.server.plugin.MessageConverter;
 import org.apache.qpid.server.protocol.MessageConverterRegistry;
-import org.apache.qpid.server.protocol.v1_0.messaging.SectionEncoder;
-import org.apache.qpid.server.protocol.v1_0.messaging.SectionEncoderImpl;
 import org.apache.qpid.server.protocol.v1_0.type.Binary;
 import org.apache.qpid.server.protocol.v1_0.type.DeliveryState;
 import org.apache.qpid.server.protocol.v1_0.type.Outcome;
 import org.apache.qpid.server.protocol.v1_0.type.UnsignedInteger;
-import org.apache.qpid.server.protocol.v1_0.type.codec.AMQPDescribedTypeRegistry;
 import org.apache.qpid.server.protocol.v1_0.type.messaging.Accepted;
 import org.apache.qpid.server.protocol.v1_0.type.messaging.EncodingRetainingSection;
 import org.apache.qpid.server.protocol.v1_0.type.messaging.Header;
@@ -76,9 +73,7 @@ class ConsumerTarget_1_0 extends AbstractConsumerTarget<ConsumerTarget_1_0>
     private long _deliveryTag = 0L;
 
     private Binary _transactionId;
-    private final AMQPDescribedTypeRegistry _typeRegistry;
     private final SendingLinkEndpoint _linkEndpoint;
-    private final SectionEncoder _sectionEncoder;
 
     private final StateChangeListener<MessageInstance, MessageInstance.EntryState> _unacknowledgedMessageListener = new StateChangeListener<MessageInstance, MessageInstance.EntryState>()
     {
@@ -102,9 +97,7 @@ class ConsumerTarget_1_0 extends AbstractConsumerTarget<ConsumerTarget_1_0>
     public ConsumerTarget_1_0(final SendingLinkEndpoint linkEndpoint, boolean acquires)
     {
         super(false, linkEndpoint.getSession().getAMQPConnection());
-        _typeRegistry = linkEndpoint.getSession().getConnection().getDescribedTypeRegistry();
         _linkEndpoint = linkEndpoint;
-        _sectionEncoder = new SectionEncoderImpl(_typeRegistry);
         _acquires = acquires;
     }
 
@@ -286,7 +279,7 @@ class ConsumerTarget_1_0 extends AbstractConsumerTarget<ConsumerTarget_1_0>
                             public void onRollback()
                             {
                                 entry.release(consumer);
-                                _linkEndpoint.updateDisposition(tag, (DeliveryState) null, true);
+                                _linkEndpoint.updateDisposition(tag, null, true);
                             }
                         });
                     }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Container.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Container.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Container.java
index 50d6fc8..f49a881 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Container.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Container.java
@@ -31,7 +31,7 @@ public class Container
 
     private static final AtomicInteger CONTAINER_ID = new AtomicInteger(0);
 
-    private String _id;
+    private final String _id;
 
     public Container()
     {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/DeserializationFactories.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/DeserializationFactories.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/DeserializationFactories.java
index 58d104f..d3dcd59 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/DeserializationFactories.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/DeserializationFactories.java
@@ -236,12 +236,7 @@ public class DeserializationFactories
 
             final UnknownErrorCondition that = (UnknownErrorCondition) o;
 
-            if (!_value.equals(that._value))
-            {
-                return false;
-            }
-
-            return true;
+            return _value.equals(that._value);
         }
 
         @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ErrantLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ErrantLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ErrantLinkEndpoint.java
index 287f038..961244d 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ErrantLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ErrantLinkEndpoint.java
@@ -37,7 +37,7 @@ public class ErrantLinkEndpoint<S extends BaseSource, T extends BaseTarget> impl
 {
     private final Link_1_0<S, T> _link;
     private final Session_1_0 _session;
-    private Error _error;
+    private final Error _error;
     private UnsignedInteger _localHandle;
 
     ErrantLinkEndpoint(Link_1_0<S, T> link, Session_1_0 session, Error error)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ExchangeSendingDestination.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ExchangeSendingDestination.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ExchangeSendingDestination.java
index 601dc9f..dd3967d 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ExchangeSendingDestination.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ExchangeSendingDestination.java
@@ -65,7 +65,7 @@ public class ExchangeSendingDestination extends StandardSendingDestination
 
     private final Exchange<?> _exchange;
     private final Symbol[] _capabilities;
-    private Map<Symbol, Filter> _filters;
+    private final Map<Symbol, Filter> _filters;
 
     ExchangeSendingDestination(Exchange<?> exchange,
                                String linkName,

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/IdentifiedTransaction.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/IdentifiedTransaction.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/IdentifiedTransaction.java
index 289d51e..1552a3a 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/IdentifiedTransaction.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/IdentifiedTransaction.java
@@ -1,18 +1,22 @@
-/**
- * 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
- * <p>
- * http://www.apache.org/licenses/LICENSE-2.0
- * <p>
- * 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.
+/*
+ *
+ * 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.qpid.server.protocol.v1_0;

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/LinkRegistryImpl.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/LinkRegistryImpl.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/LinkRegistryImpl.java
index 7c9e227..caef52f 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/LinkRegistryImpl.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/LinkRegistryImpl.java
@@ -46,14 +46,10 @@ public class LinkRegistryImpl implements LinkRegistry
     private final ConcurrentMap<LinkKey, Link_1_0<? extends BaseSource, ? extends BaseTarget>> _sendingLinkRegistry = new ConcurrentHashMap<>();
     private final ConcurrentMap<LinkKey, Link_1_0<? extends BaseSource, ? extends BaseTarget>> _receivingLinkRegistry = new ConcurrentHashMap<>();
 
-    private final NamedAddressSpace _addressSpace;
-
     private final LinkStore _linkStore;
 
     LinkRegistryImpl(final NamedAddressSpace addressSpace)
     {
-        _addressSpace = addressSpace;
-
         LinkStoreFactory storeFactory = null;
         Iterable<LinkStoreFactory> linkStoreFactories = new QpidServiceLoader().instancesOf(LinkStoreFactory.class);
         for (LinkStoreFactory linkStoreFactory : linkStoreFactories)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
index 8192d36..ca3b035 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_Internal_to_v1_0.java
@@ -291,11 +291,11 @@ public class MessageConverter_Internal_to_v1_0 extends MessageConverter_to_1_0<I
         }
         else if (object instanceof Map)
         {
-            return new AmqpValue(MessageConverter_to_1_0.fixMapValues((Map) object));
+            return new AmqpValue(MessageConverter_to_1_0.fixMapValues((Map<String,Object>) object));
         }
         else if (object instanceof List)
         {
-            return new AmqpSequence(MessageConverter_to_1_0.fixListValues((List) object));
+            return new AmqpSequence(MessageConverter_to_1_0.fixListValues((List<Object>) object));
         }
         else
         {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_from_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_from_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_from_1_0.java
index 2e27f47..a0158ad 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_from_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_from_1_0.java
@@ -29,7 +29,6 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Date;
 import java.util.HashSet;
-import java.util.Iterator;
 import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.ListIterator;
@@ -155,15 +154,12 @@ public class MessageConverter_from_1_0
         return bodyObject;
     }
 
-    private static Map convertMap(final Map map)
+    private static Map<Object, Object> convertMap(final Map<Object, Object> map)
     {
-        Map resultMap = new LinkedHashMap();
-        Iterator<Map.Entry> iterator = map.entrySet().iterator();
-        while(iterator.hasNext())
+        Map<Object, Object> resultMap = new LinkedHashMap<>();
+        for (final Map.Entry<Object, Object> entry :  map.entrySet())
         {
-            Map.Entry entry = iterator.next();
             resultMap.put(convertValue(entry.getKey()), convertValue(entry.getValue()));
-
         }
         return resultMap;
     }
@@ -174,11 +170,11 @@ public class MessageConverter_from_1_0
         {
             if(value instanceof Map)
             {
-                return convertMap((Map)value);
+                return convertMap((Map<Object,Object>)value);
             }
             else if(value instanceof List)
             {
-                return convertList((List)value);
+                return convertList((List<Object>)value);
             }
             else if(value instanceof UnsignedByte)
             {
@@ -217,9 +213,9 @@ public class MessageConverter_from_1_0
         }
     }
 
-    private static List convertList(final List list)
+    private static List<Object> convertList(final List<Object> list)
     {
-        List result = new ArrayList(list.size());
+        List<Object> result = new ArrayList<>(list.size());
         for(Object entry : list)
         {
             result.add(convertValue(entry));
@@ -231,58 +227,10 @@ public class MessageConverter_from_1_0
     {
         Symbol contentType = getContentType(serverMsg);
 
-        JmsMessageTypeAnnotation jmsMessageTypeAnnotation = null;
-        MessageAnnotationsSection section = serverMsg.getMessageAnnotationsSection();
-        if (section != null)
-        {
-            Map<Symbol, Object> annotations = section.getValue();
-            if (annotations != null && annotations.containsKey(JmsMessageTypeAnnotation.ANNOTATION_KEY))
-            {
-                Object object = annotations.get(JmsMessageTypeAnnotation.ANNOTATION_KEY);
-                if (object instanceof Byte)
-                {
-                    try
-                    {
-                        jmsMessageTypeAnnotation = JmsMessageTypeAnnotation.valueOf(((Byte) object));
-                    }
-                    catch (IllegalArgumentException e)
-                    {
-                        // ignore
-                    }
-                }
-            }
-        }
+        JmsMessageTypeAnnotation jmsMessageTypeAnnotation = getJmsMessageTypeAnnotation(serverMsg);
 
-        Class<?> classHint = null;
         String mimeTypeHint = null;
-
-        if (jmsMessageTypeAnnotation != null)
-        {
-            switch (jmsMessageTypeAnnotation)
-            {
-                case MESSAGE:
-                    classHint = Void.class;
-                    break;
-                case MAP_MESSAGE:
-                    classHint = Map.class;
-                    break;
-                case BYTES_MESSAGE:
-                    classHint = byte[].class;
-                    break;
-                case OBJECT_MESSAGE:
-                    classHint = Serializable.class;
-                    break;
-                case TEXT_MESSAGE:
-                    classHint = String.class;
-                    break;
-                case STREAM_MESSAGE:
-                    classHint = List.class;
-                    break;
-                default:
-                    throw new ServerScopedRuntimeException(String.format(
-                            "Unexpected jms message type annotation %s", jmsMessageTypeAnnotation));
-            }
-        }
+        Class<?> classHint = getContentTypeClassHint(jmsMessageTypeAnnotation);
 
         if (contentType != null)
         {
@@ -327,6 +275,65 @@ public class MessageConverter_from_1_0
         return new ContentHint(classHint, mimeTypeHint);
     }
 
+    static Class<?> getContentTypeClassHint(final JmsMessageTypeAnnotation jmsMessageTypeAnnotation)
+    {
+        Class<?> classHint = null;
+        if (jmsMessageTypeAnnotation != null)
+        {
+            switch (jmsMessageTypeAnnotation)
+            {
+                case MESSAGE:
+                    classHint = Void.class;
+                    break;
+                case MAP_MESSAGE:
+                    classHint = Map.class;
+                    break;
+                case BYTES_MESSAGE:
+                    classHint = byte[].class;
+                    break;
+                case OBJECT_MESSAGE:
+                    classHint = Serializable.class;
+                    break;
+                case TEXT_MESSAGE:
+                    classHint = String.class;
+                    break;
+                case STREAM_MESSAGE:
+                    classHint = List.class;
+                    break;
+                default:
+                    throw new ServerScopedRuntimeException(String.format(
+                            "Unexpected jms message type annotation %s", jmsMessageTypeAnnotation));
+            }
+        }
+        return classHint;
+    }
+
+    static JmsMessageTypeAnnotation getJmsMessageTypeAnnotation(final Message_1_0 serverMsg)
+    {
+        JmsMessageTypeAnnotation jmsMessageTypeAnnotation = null;
+        MessageAnnotationsSection section = serverMsg.getMessageAnnotationsSection();
+        if (section != null)
+        {
+            Map<Symbol, Object> annotations = section.getValue();
+            if (annotations != null && annotations.containsKey(JmsMessageTypeAnnotation.ANNOTATION_KEY))
+            {
+                Object object = annotations.get(JmsMessageTypeAnnotation.ANNOTATION_KEY);
+                if (object instanceof Byte)
+                {
+                    try
+                    {
+                        jmsMessageTypeAnnotation = JmsMessageTypeAnnotation.valueOf(((Byte) object));
+                    }
+                    catch (IllegalArgumentException e)
+                    {
+                        // ignore
+                    }
+                }
+            }
+        }
+        return jmsMessageTypeAnnotation;
+    }
+
     public static Symbol getContentType(final Message_1_0 serverMsg)
     {
         final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
@@ -445,7 +452,7 @@ public class MessageConverter_from_1_0
         return replyTo;
     }
 
-    public static Symbol getContentEncoding(final Message_1_0 serverMsg)
+    static Symbol getContentEncoding(final Message_1_0 serverMsg)
     {
         Symbol contentEncoding = null;
         final PropertiesSection propertiesSection = serverMsg.getPropertiesSection();
@@ -543,13 +550,13 @@ public class MessageConverter_from_1_0
         private final Class<?> _contentClass;
         private final String _contentType;
 
-        public ContentHint(final Class<?> contentClass, final String contentType)
+        ContentHint(final Class<?> contentClass, final String contentType)
         {
             _contentClass = contentClass;
             _contentType = contentType;
         }
 
-        public Class<?> getContentClass()
+        Class<?> getContentClass()
         {
             return _contentClass;
         }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_to_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_to_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_to_1_0.java
index 3ad1500..fa85d84 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_to_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_to_1_0.java
@@ -76,7 +76,7 @@ public abstract class MessageConverter_to_1_0<M extends ServerMessage> implement
                                                                                      .registerTransactionLayer()
                                                                                      .registerSecurityLayer();
 
-    public static Symbol getContentType(final String contentMimeType, final EncodingRetainingSection<?> bodySection)
+    public static Symbol getContentType(final String contentMimeType)
     {
         Symbol contentType = null;
         if (contentMimeType != null)
@@ -302,7 +302,7 @@ public abstract class MessageConverter_to_1_0<M extends ServerMessage> implement
         return new Data(new Binary(data));
     }
 
-    static Map fixMapValues(Map<String, Object> map)
+    static Map<String, Object> fixMapValues(Map<String, Object> map)
     {
         map = new LinkedHashMap<>(map);
         for(Map.Entry<String,Object> entry : map.entrySet())
@@ -332,7 +332,7 @@ public abstract class MessageConverter_to_1_0<M extends ServerMessage> implement
         }
     }
 
-    static List fixListValues(List<Object> list)
+    static List<Object> fixListValues(List<Object> list)
     {
         list = new ArrayList<>(list);
         ListIterator<Object> iterator = list.listIterator();

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
index 6e015d1..15039d6 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageConverter_v1_0_to_Internal.java
@@ -75,21 +75,20 @@ public class MessageConverter_v1_0_to_Internal implements MessageConverter<Messa
     {
         final String convertedMimeType = getInternalConvertedMimeType(serverMessage, convertedBodyObject);
         final MessageMetaData_1_0.MessageHeader_1_0 messageHeader = serverMessage.getMessageHeader();
-        final InternalMessageHeader header = new InternalMessageHeader(messageHeader.getHeadersAsMap(),
-                                                                       messageHeader.getCorrelationId(),
-                                                                       messageHeader.getExpiration(),
-                                                                       messageHeader.getUserId(),
-                                                                       messageHeader.getAppId(),
-                                                                       messageHeader.getMessageId(),
-                                                                       convertedMimeType,
-                                                                       messageHeader.getEncoding(),
-                                                                       messageHeader.getPriority(),
-                                                                       messageHeader.getTimestamp(),
-                                                                       messageHeader.getNotValidBefore(),
-                                                                       messageHeader.getType(),
-                                                                       messageHeader.getReplyTo(),
-                                                                       serverMessage.getArrivalTime());
-        return header;
+        return new InternalMessageHeader(messageHeader.getHeadersAsMap(),
+                                         messageHeader.getCorrelationId(),
+                                         messageHeader.getExpiration(),
+                                         messageHeader.getUserId(),
+                                         messageHeader.getAppId(),
+                                         messageHeader.getMessageId(),
+                                         convertedMimeType,
+                                         messageHeader.getEncoding(),
+                                         messageHeader.getPriority(),
+                                         messageHeader.getTimestamp(),
+                                         messageHeader.getNotValidBefore(),
+                                         messageHeader.getType(),
+                                         messageHeader.getReplyTo(),
+                                         serverMessage.getArrivalTime());
     }
 
     @Override
@@ -166,59 +165,11 @@ public class MessageConverter_v1_0_to_Internal implements MessageConverter<Messa
     {
         Symbol contentType = MessageConverter_from_1_0.getContentType(serverMsg);
 
-        JmsMessageTypeAnnotation jmsMessageTypeAnnotation = null;
-        MessageAnnotationsSection section = serverMsg.getMessageAnnotationsSection();
-        if (section != null)
-        {
-            Map<Symbol, Object> annotations = section.getValue();
-            if (annotations != null && annotations.containsKey(JmsMessageTypeAnnotation.ANNOTATION_KEY))
-            {
-                Object object = annotations.get(JmsMessageTypeAnnotation.ANNOTATION_KEY);
-                if (object instanceof Byte)
-                {
-                    try
-                    {
-                        jmsMessageTypeAnnotation = JmsMessageTypeAnnotation.valueOf(((Byte) object));
-                    }
-                    catch (IllegalArgumentException e)
-                    {
-                        // ignore
-                    }
-                }
-            }
-        }
+        JmsMessageTypeAnnotation jmsMessageTypeAnnotation = MessageConverter_from_1_0.getJmsMessageTypeAnnotation(serverMsg);
 
-        Class<?> classHint = null;
+        Class<?> classHint = MessageConverter_from_1_0.getContentTypeClassHint(jmsMessageTypeAnnotation);
         String mimeTypeHint = null;
 
-        if (jmsMessageTypeAnnotation != null)
-        {
-            switch (jmsMessageTypeAnnotation)
-            {
-                case MESSAGE:
-                    classHint = Void.class;
-                    break;
-                case MAP_MESSAGE:
-                    classHint = Map.class;
-                    break;
-                case BYTES_MESSAGE:
-                    classHint = byte[].class;
-                    break;
-                case OBJECT_MESSAGE:
-                    classHint = Serializable.class;
-                    break;
-                case TEXT_MESSAGE:
-                    classHint = String.class;
-                    break;
-                case STREAM_MESSAGE:
-                    classHint = List.class;
-                    break;
-                default:
-                    throw new ServerScopedRuntimeException(String.format(
-                            "Unexpected jms message type annotation %s", jmsMessageTypeAnnotation));
-            }
-        }
-
         if (contentType != null)
         {
             Class<?> contentTypeClassHint = null;

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageFormat_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageFormat_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageFormat_1_0.java
index a474f4c..6da3327 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageFormat_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageFormat_1_0.java
@@ -118,9 +118,8 @@ public class MessageFormat_1_0 implements MessageFormat<Message_1_0>
             dataSection.dispose();
         }
         final StoredMessage<MessageMetaData_1_0> storedMessage = handle.allContentAdded();
-        Message_1_0 message = new Message_1_0(storedMessage, connectionReference);
 
-        return message;
+        return new Message_1_0(storedMessage, connectionReference);
     }
 
     private MessageMetaData_1_0 createMessageMetaData(final List<EncodingRetainingSection<?>> allSections,

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
index 2eb919f..6bd9249 100755
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/MessageMetaData_1_0.java
@@ -65,7 +65,7 @@ public class MessageMetaData_1_0 implements StorableMessageMetaData
     public static final MessageMetaDataType.Factory<MessageMetaData_1_0> FACTORY = new MetaDataFactory();
     private static final byte VERSION_BYTE = 1;
 
-    private long _contentSize;
+    private final long _contentSize;
 
     // TODO move to somewhere more useful
     private static final Symbol DELIVERY_TIME = Symbol.valueOf("x-opt-delivery-time");

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Message_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Message_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Message_1_0.java
index 25e7666..50fd0f3 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Message_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Message_1_0.java
@@ -198,11 +198,9 @@ public class Message_1_0 extends AbstractServerMessageImpl<Message_1_0, MessageM
                 {
                     buf.dispose();
                 }
-                Iterator<EncodingRetainingSection<?>> iter = sections.iterator();
 
-                while (iter.hasNext())
+                for (final EncodingRetainingSection<?> section : sections)
                 {
-                    final EncodingRetainingSection<?> section = iter.next();
                     if (section instanceof DataSection
                         || section instanceof AmqpValueSection
                         || section instanceof AmqpSequenceSection)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/NodeReceivingDestination.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/NodeReceivingDestination.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/NodeReceivingDestination.java
index 192a618..57ad962 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/NodeReceivingDestination.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/NodeReceivingDestination.java
@@ -53,9 +53,9 @@ public class NodeReceivingDestination implements ReceivingDestination
     private final boolean _discardUnroutable;
     private final EventLogger _eventLogger;
 
-    private MessageDestination _destination;
-    private TerminusDurability _durability;
-    private TerminusExpiryPolicy _expiryPolicy;
+    private final MessageDestination _destination;
+    private final TerminusDurability _durability;
+    private final TerminusExpiryPolicy _expiryPolicy;
     private final String _address;
     private final String _routingAddress;
 

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0.java
index 784d735..618e8ff 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0.java
@@ -112,7 +112,7 @@ public class ProtocolEngineCreator_1_0_0 implements ProtocolEngineCreator
         return ProtocolEngineCreator_1_0_0_SASL.getInstance().getHeaderIdentifier();
     }
 
-    private static ProtocolEngineCreator INSTANCE = new ProtocolEngineCreator_1_0_0();
+    private static final ProtocolEngineCreator INSTANCE = new ProtocolEngineCreator_1_0_0();
 
     public static ProtocolEngineCreator getInstance()
     {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
index dc6ceee..4def7a9 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/ProtocolEngineCreator_1_0_0_SASL.java
@@ -81,7 +81,7 @@ public class ProtocolEngineCreator_1_0_0_SASL implements ProtocolEngineCreator
         return null;
     }
 
-    private static ProtocolEngineCreator INSTANCE = new ProtocolEngineCreator_1_0_0_SASL();
+    private static final ProtocolEngineCreator INSTANCE = new ProtocolEngineCreator_1_0_0_SASL();
 
     public static ProtocolEngineCreator getInstance()
     {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
index 0e4a90c..6174f62 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SendingLinkEndpoint.java
@@ -103,7 +103,7 @@ public class SendingLinkEndpoint extends AbstractLinkEndpoint<Source, Target>
         super(session, link);
         setDeliveryCount(new SequenceNumber(0));
         setAvailable(UnsignedInteger.valueOf(0));
-        setCapabilities(Arrays.asList(AMQPConnection_1_0.SHARED_SUBSCRIPTIONS));
+        setCapabilities(Collections.singletonList(AMQPConnection_1_0.SHARED_SUBSCRIPTIONS));
     }
 
     @Override
@@ -203,8 +203,8 @@ public class SendingLinkEndpoint extends AbstractLinkEndpoint<Source, Target>
     {
         final Source source = getSource();
         _consumerTarget = new ConsumerTarget_1_0(this,
-                                         _destination instanceof ExchangeSendingDestination
-                                                 ? true : source.getDistributionMode() != StdDistMode.COPY);
+                                                 _destination instanceof ExchangeSendingDestination
+                                                 || source.getDistributionMode() != StdDistMode.COPY);
         try
         {
             final String name = getTarget().getAddress() == null ? getLinkName() : getTarget().getAddress();
@@ -263,6 +263,7 @@ public class SendingLinkEndpoint extends AbstractLinkEndpoint<Source, Target>
                     }
                     catch (NumberFormatException e)
                     {
+                        // ignore
                     }
                 }
                 if(_priority != null)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SequenceNumber.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SequenceNumber.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SequenceNumber.java
index daf048d..5195b00 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SequenceNumber.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SequenceNumber.java
@@ -64,12 +64,7 @@ public class SequenceNumber implements Comparable<SequenceNumber>
 
         SequenceNumber that = (SequenceNumber) o;
 
-        if (_seqNo != that._seqNo)
-        {
-            return false;
-        }
-
-        return true;
+        return _seqNo == that._seqNo;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SessionState.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SessionState.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SessionState.java
index ca410f7..d29b997 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SessionState.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/SessionState.java
@@ -30,6 +30,6 @@ public enum SessionState
     BEGIN_RECVD,
     END_SENT,
     END_RECVD,
-    ENDED;
+    ENDED
 
 }

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
index 6505bcd..e3e013d 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/Session_1_0.java
@@ -63,7 +63,6 @@ import org.apache.qpid.server.model.DestinationAddress;
 import org.apache.qpid.server.model.Exchange;
 import org.apache.qpid.server.model.NamedAddressSpace;
 import org.apache.qpid.server.model.Queue;
-import org.apache.qpid.server.model.Session;
 import org.apache.qpid.server.protocol.v1_0.delivery.DeliveryRegistry;
 import org.apache.qpid.server.protocol.v1_0.delivery.DeliveryRegistryImpl;
 import org.apache.qpid.server.protocol.v1_0.delivery.UnsettledDelivery;
@@ -88,7 +87,6 @@ import org.apache.qpid.server.protocol.v1_0.type.messaging.Target;
 import org.apache.qpid.server.protocol.v1_0.type.transport.AmqpError;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Attach;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Begin;
-import org.apache.qpid.server.protocol.v1_0.type.transport.ConnectionError;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Detach;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Disposition;
 import org.apache.qpid.server.protocol.v1_0.type.transport.End;
@@ -119,7 +117,7 @@ public class Session_1_0 extends AbstractAMQPSession<Session_1_0, ConsumerTarget
             EnumSet.of(SessionState.END_RECVD, SessionState.END_PIPE, SessionState.END_SENT, SessionState.ENDED);
 
     private final AMQPConnection_1_0<?> _connection;
-    private AtomicBoolean _closed = new AtomicBoolean();
+    private final AtomicBoolean _closed = new AtomicBoolean();
 
     private SessionState _sessionState;
 
@@ -127,7 +125,6 @@ public class Session_1_0 extends AbstractAMQPSession<Session_1_0, ConsumerTarget
     private final Map<UnsignedInteger, LinkEndpoint<? extends BaseSource, ? extends BaseTarget>> _inputHandleToEndpoint = new HashMap<>();
     private final Set<LinkEndpoint<? extends BaseSource, ? extends BaseTarget>> _associatedLinkEndpoints = new HashSet<>();
 
-    private final int _receivingChannel;
     private final int _sendingChannel;
 
 
@@ -135,10 +132,10 @@ public class Session_1_0 extends AbstractAMQPSession<Session_1_0, ConsumerTarget
 
     private int _nextOutgoingDeliveryId;
 
-    private UnsignedInteger _initialOutgoingId = UnsignedInteger.ZERO;
+    private final UnsignedInteger _initialOutgoingId = UnsignedInteger.ZERO;
     private SequenceNumber _nextIncomingId;
     private final UnsignedInteger _incomingWindow;
-    private SequenceNumber _nextOutgoingId = new SequenceNumber(_initialOutgoingId.intValue());
+    private final SequenceNumber _nextOutgoingId = new SequenceNumber(_initialOutgoingId.intValue());
     private final UnsignedInteger _outgoingWindow = UnsignedInteger.valueOf(DEFAULT_SESSION_BUFFER_SIZE);
     private volatile long _remoteIncomingWindow;
     private UnsignedInteger _remoteOutgoingWindow = UnsignedInteger.ZERO;
@@ -166,7 +163,6 @@ public class Session_1_0 extends AbstractAMQPSession<Session_1_0, ConsumerTarget
     {
         super(connection, sendingChannelId);
         _sendingChannel = sendingChannelId;
-        _receivingChannel = receivingChannelId;
         _sessionState = SessionState.ACTIVE;
         _nextIncomingId = new SequenceNumber(begin.getNextOutgoingId().intValue());
         _connection = connection;

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/StandardReceivingLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/StandardReceivingLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/StandardReceivingLinkEndpoint.java
index fd98eed..d7d3efc 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/StandardReceivingLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/StandardReceivingLinkEndpoint.java
@@ -59,7 +59,6 @@ import org.apache.qpid.server.protocol.v1_0.type.transport.AmqpError;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Attach;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Detach;
 import org.apache.qpid.server.protocol.v1_0.type.transport.Error;
-import org.apache.qpid.server.protocol.v1_0.type.transport.LinkError;
 import org.apache.qpid.server.protocol.v1_0.type.transport.ReceiverSettleMode;
 import org.apache.qpid.server.txn.AutoCommitTransaction;
 import org.apache.qpid.server.txn.LocalTransaction;

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorReceivingLinkEndpoint.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorReceivingLinkEndpoint.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorReceivingLinkEndpoint.java
index e063815..afab510 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorReceivingLinkEndpoint.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/TxnCoordinatorReceivingLinkEndpoint.java
@@ -97,7 +97,7 @@ public class TxnCoordinatorReceivingLinkEndpoint extends AbstractReceivingLinkEn
 
                         session.incrementStartedTransactions();
 
-                        state.setTxnId(session.integerToTransactionId(txn.getId()));
+                        state.setTxnId(Session_1_0.integerToTransactionId(txn.getId()));
                         updateDisposition(delivery.getDeliveryTag(), state, true);
 
                     }
@@ -162,7 +162,7 @@ public class TxnCoordinatorReceivingLinkEndpoint extends AbstractReceivingLinkEn
         ServerTransaction txn = null;
         try
         {
-            transactionId = getSession().transactionIdToInteger(transactionIdAsBinary);
+            transactionId = Session_1_0.transactionIdToInteger(transactionIdAsBinary);
             txn = _createdTransactions.get(transactionId);
         }
         catch (UnknownTransactionException | IllegalArgumentException e)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/AbstractDescribedTypeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/AbstractDescribedTypeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/AbstractDescribedTypeConstructor.java
index c8da269..7b1cda6 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/AbstractDescribedTypeConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/AbstractDescribedTypeConstructor.java
@@ -25,7 +25,7 @@ import java.util.List;
 import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 import org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException;
 
-public abstract class AbstractDescribedTypeConstructor<T extends Object> implements DescribedTypeConstructor<T>
+public abstract class AbstractDescribedTypeConstructor<T> implements DescribedTypeConstructor<T>
 {
     @Override
     public TypeConstructor<T> construct(final Object descriptor,
@@ -38,11 +38,11 @@ public abstract class AbstractDescribedTypeConstructor<T extends Object> impleme
 
     protected abstract T construct(Object underlying) throws AmqpErrorException;
 
-    private static class TypeConstructorFromUnderlying<S extends Object> implements TypeConstructor<S>
+    private static class TypeConstructorFromUnderlying<S> implements TypeConstructor<S>
     {
 
         private final TypeConstructor _describedConstructor;
-        private AbstractDescribedTypeConstructor<S> _describedTypeConstructor;
+        private final AbstractDescribedTypeConstructor<S> _describedTypeConstructor;
 
         public TypeConstructorFromUnderlying(final AbstractDescribedTypeConstructor<S> describedTypeConstructor,
                                              final TypeConstructor describedConstructor)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ArrayTypeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ArrayTypeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ArrayTypeConstructor.java
index a25f506..3c75d96 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ArrayTypeConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ArrayTypeConstructor.java
@@ -43,10 +43,10 @@ public abstract class ArrayTypeConstructor implements TypeConstructor<Object[]>
                                          size, remaining);
         }
 
-        List rval;
+        List<Object> rval;
         int count = read(in);
         TypeConstructor t = handler.readConstructor(in);
-        rval = new ArrayList(count);
+        rval = new ArrayList<>(count);
         for(int i = 0; i < count; i++)
         {
             rval.add(t.construct(in, handler));

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryTypeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryTypeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryTypeConstructor.java
index 622e9ea..3ab576e 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryTypeConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryTypeConstructor.java
@@ -22,12 +22,13 @@ package org.apache.qpid.server.protocol.v1_0.codec;
 
 import java.util.List;
 
+import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 import org.apache.qpid.server.bytebuffer.QpidByteBufferUtils;
 import org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException;
 import org.apache.qpid.server.protocol.v1_0.type.Binary;
 import org.apache.qpid.server.protocol.v1_0.type.transport.AmqpError;
 
-public class BinaryTypeConstructor extends VariableWidthTypeConstructor
+public class BinaryTypeConstructor extends VariableWidthTypeConstructor<Binary>
 {
     private static final BinaryTypeConstructor INSTANCE_1 = new BinaryTypeConstructor(1);
     private static final BinaryTypeConstructor INSTANCE_4 = new BinaryTypeConstructor(4);
@@ -44,7 +45,7 @@ public class BinaryTypeConstructor extends VariableWidthTypeConstructor
     }
 
     @Override
-    public Object construct(final List in, final ValueHandler handler) throws AmqpErrorException
+    public Binary construct(final List<QpidByteBuffer> in, final ValueHandler handler) throws AmqpErrorException
     {
 
         int size;

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryWriter.java
index 3ab7350..d6c5364 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BinaryWriter.java
@@ -44,7 +44,7 @@ public class BinaryWriter extends SimpleVariableWidthWriter<Binary>
     }
 
 
-    private static Factory<Binary> FACTORY = new Factory<Binary>()
+    private static final Factory<Binary> FACTORY = new Factory<Binary>()
                                             {
 
                                                 @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanConstructor.java
index 08431cd..38fda60 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanConstructor.java
@@ -23,8 +23,7 @@ import java.util.List;
 
 import org.apache.qpid.server.bytebuffer.QpidByteBufferUtils;
 import org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException;
-import org.apache.qpid.server.protocol.v1_0.type.transport.*;
-import org.apache.qpid.server.protocol.v1_0.type.transport.Error;
+import org.apache.qpid.server.protocol.v1_0.type.transport.AmqpError;
 import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 
 public class BooleanConstructor

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanWriter.java
index a495c3e..a2fd5cc 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/BooleanWriter.java
@@ -53,7 +53,7 @@ public class BooleanWriter implements ValueWriter<Boolean>
         _value = value.booleanValue();
     }
 
-    private static Factory<Boolean> FACTORY = new Factory<Boolean>()
+    private static final Factory<Boolean> FACTORY = new Factory<Boolean>()
                                             {
 
                                                 @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteArrayWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteArrayWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteArrayWriter.java
index a5a23eb..0cd4c09 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteArrayWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteArrayWriter.java
@@ -41,7 +41,7 @@ public class ByteArrayWriter extends SimpleVariableWidthWriter<byte[]>
         return (byte)0xa0;
     }
 
-    private static Factory<byte[]> FACTORY = new Factory<byte[]>()
+    private static final Factory<byte[]> FACTORY = new Factory<byte[]>()
                                             {
 
                                                 @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteWriter.java
index 9d8b96f..ea5087d 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/ByteWriter.java
@@ -55,7 +55,7 @@ public class ByteWriter implements ValueWriter<Byte>
         _value = value.byteValue();
     }
 
-    private static Factory<Byte> FACTORY = new Factory<Byte>()
+    private static final Factory<Byte> FACTORY = new Factory<Byte>()
                                             {
 
                                                 @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CharWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CharWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CharWriter.java
index e8eac25..0300a4c 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CharWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CharWriter.java
@@ -36,7 +36,7 @@ public class CharWriter extends FixedFourWriter<Character>
         return FORMAT_CODE;
     }
 
-    private static Factory<Character> FACTORY = new Factory<Character>()
+    private static final Factory<Character> FACTORY = new Factory<Character>()
                                             {
 
                                                 @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundTypeAssembler.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundTypeAssembler.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundTypeAssembler.java
deleted file mode 100644
index be5ff5a..0000000
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundTypeAssembler.java
+++ /dev/null
@@ -1,36 +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.qpid.server.protocol.v1_0.codec;
-
-import org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException;
-
-public interface CompoundTypeAssembler<X>
-{
-
-    interface Factory<X>
-    {
-        CompoundTypeAssembler<X> newInstance();
-    }
-
-    void init(int count) throws AmqpErrorException;
-    void addItem(Object obj) throws AmqpErrorException;
-    X complete()  throws AmqpErrorException;
-}

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundWriter.java
index 13422f2..02771ea 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/CompoundWriter.java
@@ -26,7 +26,7 @@ import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 public abstract class CompoundWriter<V> implements ValueWriter<V>
 {
     private int _length = -1;
-    private Registry _registry;
+    private final Registry _registry;
 
     public CompoundWriter(final Registry registry)
     {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DecimalConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DecimalConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DecimalConstructor.java
index d7ae43f..f996de1 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DecimalConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DecimalConstructor.java
@@ -181,12 +181,12 @@ public abstract class DecimalConstructor implements TypeConstructor<BigDecimal>
 
         if((val & 0x60000000) != 0x60000000)
         {
-            exponent = ((int) ((val & 0x7F800000) >> 23)) - 101;
+            exponent = ((val & 0x7F800000) >> 23) - 101;
             significand = val & 0x007fffffff;
         }
         else if((val &  0x78000000) != 0x78000000)
         {
-            exponent = ((int)((val & 0x1fe00000)>>21)) - 101;
+            exponent = ((val & 0x1fe00000)>>21) - 101;
             significand = (0x001fffff & val) | 0x00800000;
         }
         else

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DefaultDescribedTypeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DefaultDescribedTypeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DefaultDescribedTypeConstructor.java
index 2a98164..085d8fb 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DefaultDescribedTypeConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DefaultDescribedTypeConstructor.java
@@ -22,7 +22,7 @@ package org.apache.qpid.server.protocol.v1_0.codec;
 
 public class DefaultDescribedTypeConstructor extends AbstractDescribedTypeConstructor
 {
-    private Object _descriptor;
+    private final Object _descriptor;
 
     public DefaultDescribedTypeConstructor(final Object descriptor)
     {

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DelegatingValueWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DelegatingValueWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DelegatingValueWriter.java
index fb4a4a4..d3938c2 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DelegatingValueWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DelegatingValueWriter.java
@@ -25,7 +25,7 @@ import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 public abstract class DelegatingValueWriter<V> implements ValueWriter<V>
 {
     private ValueWriter _delegate;
-    private Registry _registry;
+    private final Registry _registry;
 
 
     protected DelegatingValueWriter(final Registry registry)

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DescribedTypeConstructor.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DescribedTypeConstructor.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DescribedTypeConstructor.java
index 77948e4..99bba13 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DescribedTypeConstructor.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DescribedTypeConstructor.java
@@ -25,7 +25,7 @@ import java.util.List;
 import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 import org.apache.qpid.server.protocol.v1_0.type.AmqpErrorException;
 
-public interface DescribedTypeConstructor<T extends Object>
+public interface DescribedTypeConstructor<T>
 {
     TypeConstructor<T> construct(Object descriptor,
                                  List<QpidByteBuffer> in,

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DoubleWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DoubleWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DoubleWriter.java
index fef83d0..9ae4dd8 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DoubleWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/DoubleWriter.java
@@ -36,7 +36,7 @@ public class DoubleWriter extends FixedEightWriter<Double>
         return FORMAT_CODE;
     }
 
-    private static Factory<Double> FACTORY = new Factory<Double>()
+    private static final Factory<Double> FACTORY = new Factory<Double>()
                                             {
 
                                                 @Override

http://git-wip-us.apache.org/repos/asf/qpid-broker-j/blob/024f9a21/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/FixedEightWriter.java
----------------------------------------------------------------------
diff --git a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/FixedEightWriter.java b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/FixedEightWriter.java
index 324584a..b8c3d0e 100644
--- a/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/FixedEightWriter.java
+++ b/broker-plugins/amqp-1-0-protocol/src/main/java/org/apache/qpid/server/protocol/v1_0/codec/FixedEightWriter.java
@@ -23,9 +23,9 @@ package org.apache.qpid.server.protocol.v1_0.codec;
 
 import org.apache.qpid.server.bytebuffer.QpidByteBuffer;
 
-public abstract class FixedEightWriter<T extends Object> implements ValueWriter<T>
+public abstract class FixedEightWriter<T> implements ValueWriter<T>
 {
-    private long _value;
+    private final long _value;
 
     public FixedEightWriter(long value)
     {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message