activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject activemq git commit: https://issues.apache.org/jira/browse/AMQ-5462
Date Tue, 12 Apr 2016 23:33:45 GMT
Repository: activemq
Updated Branches:
  refs/heads/master f9682b802 -> 08d797740


https://issues.apache.org/jira/browse/AMQ-5462

Remove dead code from session create method.

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

Branch: refs/heads/master
Commit: 08d7977402f4120cfe704b773c380dcfa7fd4074
Parents: f9682b8
Author: Timothy Bish <tabish121@gmail.com>
Authored: Tue Apr 12 19:32:29 2016 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Tue Apr 12 19:32:29 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/ActiveMQConnection.java   | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/08d79774/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
index e35c9e1..f77f879 100755
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQConnection.java
@@ -19,7 +19,11 @@ package org.apache.activemq;
 import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.ConcurrentMap;
 import java.util.concurrent.CopyOnWriteArrayList;
@@ -322,16 +326,15 @@ public class ActiveMQConnection implements Connection, TopicConnection,
QueueCon
     public Session createSession(boolean transacted, int acknowledgeMode) throws JMSException
{
         checkClosedOrFailed();
         ensureConnectionInfoSent();
-        if(!transacted) {
-            if (acknowledgeMode==Session.SESSION_TRANSACTED) {
+        if (!transacted) {
+            if (acknowledgeMode == Session.SESSION_TRANSACTED) {
                 throw new JMSException("acknowledgeMode SESSION_TRANSACTED cannot be used
for an non-transacted Session");
             } else if (acknowledgeMode < Session.SESSION_TRANSACTED || acknowledgeMode
> ActiveMQSession.MAX_ACK_CONSTANT) {
                 throw new JMSException("invalid acknowledgeMode: " + acknowledgeMode + ".
Valid values are Session.AUTO_ACKNOWLEDGE (1), " +
                         "Session.CLIENT_ACKNOWLEDGE (2), Session.DUPS_OK_ACKNOWLEDGE (3),
ActiveMQSession.INDIVIDUAL_ACKNOWLEDGE (4) or for transacted sessions Session.SESSION_TRANSACTED
(0)");
             }
         }
-        return new ActiveMQSession(this, getNextSessionId(), transacted ? Session.SESSION_TRANSACTED
: (acknowledgeMode == Session.SESSION_TRANSACTED
-            ? Session.AUTO_ACKNOWLEDGE : acknowledgeMode), isDispatchAsync(), isAlwaysSessionAsync());
+        return new ActiveMQSession(this, getNextSessionId(), transacted ? Session.SESSION_TRANSACTED
: acknowledgeMode, isDispatchAsync(), isAlwaysSessionAsync());
     }
 
     /**


Mime
View raw message