diff --git a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java index 3696a6894c..57b2502fe4 100644 --- a/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java +++ b/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java @@ -122,7 +122,7 @@ public class AmqpConnection implements AmqpProtocolConverter { BROKER_PLATFORM = "Java/" + (javaVersion == null ? "unknown" : javaVersion); InputStream in = null; - String version = "5.12.0"; + String version = ""; if ((in = AmqpConnection.class.getResourceAsStream("/org/apache/activemq/version.txt")) != null) { BufferedReader reader = new BufferedReader(new InputStreamReader(in)); try { @@ -152,9 +152,9 @@ public class AmqpConnection implements AmqpProtocolConverter { private boolean closedSocket; private AmqpAuthenticator authenticator; - private final Map transactions = new HashMap(); - private final ConcurrentMap resposeHandlers = new ConcurrentHashMap(); - private final ConcurrentMap subscriptionsByConsumerId = new ConcurrentHashMap(); + private final Map transactions = new HashMap<>(); + private final ConcurrentMap resposeHandlers = new ConcurrentHashMap<>(); + private final ConcurrentMap subscriptionsByConsumerId = new ConcurrentHashMap<>(); public AmqpConnection(AmqpTransport transport, BrokerService brokerService) { this.amqpTransport = transport; @@ -199,7 +199,7 @@ public class AmqpConnection implements AmqpProtocolConverter { * @return the properties that are offered to the incoming connection. */ protected Map getConnetionProperties() { - Map properties = new HashMap(); + Map properties = new HashMap<>(); properties.put(QUEUE_PREFIX, "queue://"); properties.put(TOPIC_PREFIX, "topic://"); @@ -218,7 +218,7 @@ public class AmqpConnection implements AmqpProtocolConverter { * @return the properties that are offered to the incoming connection. */ protected Map getFailedConnetionProperties() { - Map properties = new HashMap(); + Map properties = new HashMap<>(); properties.put(CONNECTION_OPEN_FAILED, true); @@ -478,7 +478,7 @@ public class AmqpConnection implements AmqpProtocolConverter { } else if (exception instanceof InvalidClientIDException) { ErrorCondition condition = new ErrorCondition(AmqpError.INVALID_FIELD, exception.getMessage()); - Map infoMap = new HashMap (); + Map infoMap = new HashMap<> (); infoMap.put(INVALID_FIELD, CONTAINER_ID); condition.setInfo(infoMap);