From 1fd24505440a11b11f6d500bc5ff547ef999b917 Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Tue, 11 Apr 2017 13:13:30 -0400 Subject: [PATCH] NO-JIRA Make the version string indicate that the value is unknown The default version string is out of date and doesn't indicate that a proper value couldn't be found, return something that makes that a bit more clear. --- .../transport/amqp/protocol/AmqpConnection.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) 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);