You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2024/04/15 14:12:26 UTC
(camel) 01/04: (chores) camel-core: simplify collection call
This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
commit d4484664c91bf3f7ccbb522dcd753ac68e449eb3
Author: Otavio Rodolfo Piske <an...@gmail.com>
AuthorDate: Thu Apr 11 17:23:14 2024 +0200
(chores) camel-core: simplify collection call
---
.../java/org/apache/camel/support/cache/SimpleSoftCacheTest.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/core/camel-core/src/test/java/org/apache/camel/support/cache/SimpleSoftCacheTest.java b/core/camel-core/src/test/java/org/apache/camel/support/cache/SimpleSoftCacheTest.java
index 28c6822c549..b79c6cd2ba8 100644
--- a/core/camel-core/src/test/java/org/apache/camel/support/cache/SimpleSoftCacheTest.java
+++ b/core/camel-core/src/test/java/org/apache/camel/support/cache/SimpleSoftCacheTest.java
@@ -73,8 +73,7 @@ class SimpleSoftCacheTest {
cache.put(1, "foo");
cache.put(2, "bar");
- Map<Integer, Object> tmp = new HashMap<>();
- tmp.putAll(cache);
+ Map<Integer, Object> tmp = new HashMap<>(cache);
assertEquals("foo", tmp.get(1));
assertEquals("bar", tmp.get(2));
@@ -84,8 +83,7 @@ class SimpleSoftCacheTest {
cache.getInnerCache().get(1).clear();
- tmp = new HashMap<>();
- tmp.putAll(cache);
+ tmp = new HashMap<>(cache);
assertNull(tmp.get(1));
assertEquals("bar", tmp.get(2));