camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [camel] 01/02: CAMEL-12037 Idempotent repository cache initialization fix.
Date Sat, 25 Nov 2017 17:05:02 GMT
This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 4a1e523e073e6761305dda292d1a52f87767fb6c
Author: Krzysztof Holdanowicz <holdanowicz@gmail.com>
AuthorDate: Sat Nov 25 16:42:04 2017 +0100

    CAMEL-12037 Idempotent repository cache initialization fix.
---
 .../camel/processor/idempotent/FileIdempotentRepository.java       | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
b/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
index f452346..01796f2 100644
--- a/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
+++ b/camel-core/src/main/java/org/apache/camel/processor/idempotent/FileIdempotentRepository.java
@@ -334,8 +334,11 @@ public class FileIdempotentRepository extends ServiceSupport implements
Idempote
     protected void doStart() throws Exception {
         ObjectHelper.notNull(fileStore, "fileStore", this);
 
-        // default use a 1st level cache
-        this.cache = LRUCacheFactory.newLRUCache(1000);
+        //CAMEL-12037
+        if (this.cache == null) {
+        	// default use a 1st level cache
+        	this.cache = LRUCacheFactory.newLRUCache(1000);
+        }
 
         // init store if not loaded before
         if (init.compareAndSet(false, true)) {

-- 
To stop receiving notification emails like this one, please contact
"commits@camel.apache.org" <commits@camel.apache.org>.

Mime
View raw message