camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] camel git commit: CAMEL-9316: LevelDBAggregationRepository is logging warnings when exchange is already complete on first aggregation
Date Sat, 21 Nov 2015 09:34:33 GMT
CAMEL-9316: LevelDBAggregationRepository is logging warnings when exchange is already complete
on first aggregation


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

Branch: refs/heads/camel-2.15.x
Commit: 958196458babd5cfe751e39df342bc78c42e6509
Parents: ec24b75
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Sat Nov 21 10:33:50 2015 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Sat Nov 21 10:34:23 2015 +0100

----------------------------------------------------------------------
 .../leveldb/LevelDBAggregationRepository.java   | 21 ++++++--------------
 1 file changed, 6 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/95819645/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/LevelDBAggregationRepository.java
----------------------------------------------------------------------
diff --git a/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/LevelDBAggregationRepository.java
b/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/LevelDBAggregationRepository.java
index a7af5bf..b13f541 100644
--- a/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/LevelDBAggregationRepository.java
+++ b/components/camel-leveldb/src/main/java/org/apache/camel/component/leveldb/LevelDBAggregationRepository.java
@@ -173,8 +173,6 @@ public class LevelDBAggregationRepository extends ServiceSupport implements
Reco
                 } finally {
                     batch.close();
                 }
-            } else {
-                LOG.warn("Unable to remove key {} from repository {}: Not Found", key, repositoryName);
             }
 
         } catch (IOException e) {
@@ -192,8 +190,6 @@ public class LevelDBAggregationRepository extends ServiceSupport implements
Reco
         if (rc != null) {
             levelDBFile.getDb().delete(confirmedLDBKey);
             LOG.trace("Removed confirm index {} -> {}", exchangeId, new Buffer(rc));
-        } else {
-            LOG.warn("Unable to confirm exchangeId [{}]", exchangeId + " from repository
" + repositoryName + ": Not Found");
         }
     }
 
@@ -207,7 +203,7 @@ public class LevelDBAggregationRepository extends ServiceSupport implements
Reco
 
         DBIterator it = levelDBFile.getDb().iterator();
 
-        String keyBuffer = null;
+        String keyBuffer;
         try {
             String prefix = repositoryName + '\0';
             for (it.seek(keyBuilder(repositoryName, "")); it.hasNext(); it.next()) {
@@ -222,10 +218,8 @@ public class LevelDBAggregationRepository extends ServiceSupport implements
Reco
 
                 String key = keyBuffer.substring(prefix.length());
 
-                if (key != null) {
-                    LOG.trace("getKey [{}]", key);
-                    keys.add(key);
-                }
+                LOG.trace("getKey [{}]", key);
+                keys.add(key);
             }
         } finally {
             // Make sure you close the iterator to avoid resource leaks.
@@ -244,7 +238,7 @@ public class LevelDBAggregationRepository extends ServiceSupport implements
Reco
 
         DBIterator it = levelDBFile.getDb().iterator();
 
-        String keyBuffer = null;
+        String keyBuffer;
         try {
             String prefix = getRepositoryNameCompleted() + '\0';
 
@@ -256,11 +250,8 @@ public class LevelDBAggregationRepository extends ServiceSupport implements
Reco
                 }
                 String exchangeId = keyBuffer.substring(prefix.length());
 
-                if (exchangeId != null) {
-                    LOG.trace("Scan exchangeId [{}]", exchangeId);
-                    answer.add(exchangeId);
-                }
-
+                LOG.trace("Scan exchangeId [{}]", exchangeId);
+                answer.add(exchangeId);
             }
         } finally {
             // Make sure you close the iterator to avoid resource leaks.


Mime
View raw message