From 0531ec2e98857f453b7f2739e766587728548ebe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20Jare=C5=A1?= Date: Mon, 25 Sep 2023 10:17:29 +0200 Subject: [PATCH] revert comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pavel Jareš --- .../src/main/java/org/zowe/apiml/util/CacheUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common-service-core/src/main/java/org/zowe/apiml/util/CacheUtils.java b/common-service-core/src/main/java/org/zowe/apiml/util/CacheUtils.java index a94ef8c760..914b4343c7 100644 --- a/common-service-core/src/main/java/org/zowe/apiml/util/CacheUtils.java +++ b/common-service-core/src/main/java/org/zowe/apiml/util/CacheUtils.java @@ -66,6 +66,8 @@ public void evictSubset(CacheManager cacheManager, String cacheName, Predicate> spliterator = ((javax.cache.Cache) nativeCache).spliterator(); Set keysToRemove = StreamSupport.stream(spliterator, true) + // if entry is compositeKey and first param is the same filter it to be removed or + // if key is not composite key (unknown for evict) evict record (as failover) .filter(e -> !(e.getKey() instanceof CompositeKey) || keyPredicate.test((CompositeKey) e.getKey())) .map(javax.cache.Cache.Entry::getKey) .collect(Collectors.toSet());