Repository: activemq
Updated Branches:
  refs/heads/activemq-5.14.x e0116d045 -> 941b86144


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

Fix conversion from long to int and back to long again.
(cherry picked from commit 1a91decf9f6dd7305dd91ae6769df78cc4758c82)


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

Branch: refs/heads/activemq-5.14.x
Commit: 941b861448d4bdf225b2f6945e50fca56c701a70
Parents: e0116d0
Author: Timothy Bish <[email protected]>
Authored: Wed Oct 26 13:27:24 2016 -0400
Committer: Timothy Bish <[email protected]>
Committed: Wed Oct 26 13:28:45 2016 -0400

----------------------------------------------------------------------
 .../java/org/apache/activemq/store/kahadb/KahaDBStore.java  | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/941b8614/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
----------------------------------------------------------------------
diff --git 
a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
 
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
index cc65bf6..5a723c9 100644
--- 
a/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
+++ 
b/activemq-kahadb-store/src/main/java/org/apache/activemq/store/kahadb/KahaDBStore.java
@@ -936,17 +936,17 @@ public class KahaDBStore extends MessageDatabase 
implements PersistenceAdapter,
             } else {
                 indexLock.writeLock().lock();
                 try {
-                    return pageFile.tx().execute(new 
Transaction.CallableClosure<Integer, IOException>() {
+                    return pageFile.tx().execute(new 
Transaction.CallableClosure<Long, IOException>() {
                         @Override
-                        public Integer execute(Transaction tx) throws 
IOException {
+                        public Long execute(Transaction tx) throws IOException 
{
                             StoredDestination sd = getStoredDestination(dest, 
tx);
                             LastAck cursorPos = getLastAck(tx, sd, 
subscriptionKey);
                             if (cursorPos == null) {
                                 // The subscription might not exist.
-                                return 0;
+                                return 0l;
                             }
 
-                            return (int) getStoredMessageSize(tx, sd, 
subscriptionKey);
+                            return getStoredMessageSize(tx, sd, 
subscriptionKey);
                         }
                     });
                 } finally {
@@ -955,7 +955,6 @@ public class KahaDBStore extends MessageDatabase implements 
PersistenceAdapter,
             }
         }
 
-
         protected void recoverMessageStoreSubMetrics() throws IOException {
             if (isEnableSubscriptionStatistics()) {
 

Reply via email to