activemq git commit: NO-JIRA Make the version string indicate that the value is unknown

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

activemq git commit: NO-JIRA Make the version string indicate that the value is unknown

tabish
Repository: activemq
Updated Branches:
  refs/heads/master af03ad467 -> 1fd245054


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.  

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

Branch: refs/heads/master
Commit: 1fd24505440a11b11f6d500bc5ff547ef999b917
Parents: af03ad4
Author: Timothy Bish <[hidden email]>
Authored: Tue Apr 11 13:13:30 2017 -0400
Committer: Timothy Bish <[hidden email]>
Committed: Tue Apr 11 13:13:30 2017 -0400

----------------------------------------------------------------------
 .../transport/amqp/protocol/AmqpConnection.java       | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/1fd24505/activemq-amqp/src/main/java/org/apache/activemq/transport/amqp/protocol/AmqpConnection.java
----------------------------------------------------------------------
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 3696a68..57b2502 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 = "<unknown-5.x>";
         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<TransactionId, AmqpTransactionCoordinator> transactions = new HashMap<TransactionId, AmqpTransactionCoordinator>();
-    private final ConcurrentMap<Integer, ResponseHandler> resposeHandlers = new ConcurrentHashMap<Integer, ResponseHandler>();
-    private final ConcurrentMap<ConsumerId, AmqpSender> subscriptionsByConsumerId = new ConcurrentHashMap<ConsumerId, AmqpSender>();
+    private final Map<TransactionId, AmqpTransactionCoordinator> transactions = new HashMap<>();
+    private final ConcurrentMap<Integer, ResponseHandler> resposeHandlers = new ConcurrentHashMap<>();
+    private final ConcurrentMap<ConsumerId, AmqpSender> 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<Symbol, Object> getConnetionProperties() {
-        Map<Symbol, Object> properties = new HashMap<Symbol, Object>();
+        Map<Symbol, Object> 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<Symbol, Object> getFailedConnetionProperties() {
-        Map<Symbol, Object> properties = new HashMap<Symbol, Object>();
+        Map<Symbol, Object> 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<Symbol, Object> infoMap = new HashMap<Symbol, Object> ();
+                            Map<Symbol, Object> infoMap = new HashMap<> ();
                             infoMap.put(INVALID_FIELD, CONTAINER_ID);
                             condition.setInfo(infoMap);
 

Loading...