qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject qpid-jms git commit: QPIDJMS-125 Remove unused transactionKey field.
Date Thu, 15 Oct 2015 13:56:06 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 541bccc18 -> bb56d0ffd


QPIDJMS-125 Remove unused transactionKey field.

Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/bb56d0ff
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/bb56d0ff
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/bb56d0ff

Branch: refs/heads/master
Commit: bb56d0ffd2a415447249a5edc19803451e841a10
Parents: 541bccc
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Oct 15 09:55:20 2015 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Oct 15 09:55:20 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/qpid/jms/meta/JmsTransactionId.java  | 11 +----------
 .../org/apache/qpid/jms/meta/JmsTransactionIdTest.java   | 10 ----------
 2 files changed, 1 insertion(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/bb56d0ff/qpid-jms-client/src/main/java/org/apache/qpid/jms/meta/JmsTransactionId.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/meta/JmsTransactionId.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/meta/JmsTransactionId.java
index 1ad5a53..c38a9f3 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/meta/JmsTransactionId.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/meta/JmsTransactionId.java
@@ -21,8 +21,6 @@ public final class JmsTransactionId extends JmsAbstractResourceId implements
Com
     private final JmsConnectionId connectionId;
     private final long value;
 
-    private transient String transactionKey;
-
     public JmsTransactionId(JmsConnectionId connectionId, long transactionId) {
         if (connectionId == null) {
             throw new IllegalArgumentException("Connection ID cannot be null");
@@ -32,16 +30,9 @@ public final class JmsTransactionId extends JmsAbstractResourceId implements
Com
         this.value = transactionId;
     }
 
-    public String getTransactionKey() {
-        if (transactionKey == null) {
-            transactionKey = "TX:" + connectionId + ":" + value;
-        }
-        return transactionKey;
-    }
-
     @Override
     public String toString() {
-        return getTransactionKey();
+        return "TX:" + connectionId + ":" + value;
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/bb56d0ff/qpid-jms-client/src/test/java/org/apache/qpid/jms/meta/JmsTransactionIdTest.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/meta/JmsTransactionIdTest.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/meta/JmsTransactionIdTest.java
index effe5a7..cdf62b5 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/meta/JmsTransactionIdTest.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/meta/JmsTransactionIdTest.java
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
 import org.apache.qpid.jms.util.IdGenerator;
@@ -57,15 +56,6 @@ public class JmsTransactionIdTest {
     }
 
     @Test
-    public void testGetTXKey() {
-        JmsTransactionId id = new JmsTransactionId(firstId, 1);
-        String txKey = id.getTransactionKey();
-        assertNotNull(txKey);
-        assertTrue(txKey.startsWith("TX:"));
-        assertSame(txKey, id.getTransactionKey());
-    }
-
-    @Test
     public void testToString() {
         JmsTransactionId id = new JmsTransactionId(firstId, 1);
         String txKey = id.toString();


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


Mime
View raw message