This is an automated email from the ASF dual-hosted git repository.

tv pushed a commit to branch release-3.1
in repository https://gitbox.apache.org/repos/asf/commons-jcs.git


The following commit(s) were added to refs/heads/release-3.1 by this push:
     new e6aca5a  Fix OOM
e6aca5a is described below

commit e6aca5a96e5b96f80cb2ef5e628bb1cf5f7f3d55
Author: Thomas Vandahl <[email protected]>
AuthorDate: Mon Jan 3 16:52:30 2022 +0100

    Fix OOM
---
 .../org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskKeyStore.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskKeyStore.java
 
b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskKeyStore.java
index 9ca5ea1..7d310a6 100644
--- 
a/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskKeyStore.java
+++ 
b/commons-jcs-core/src/main/java/org/apache/commons/jcs3/auxiliary/disk/block/BlockDiskKeyStore.java
@@ -580,7 +580,7 @@ public class BlockDiskKeyStore<K>
         {
             for (final int block : e.getValue())
             {
-                Set<K> keys = blockAllocationMap.computeIfAbsent(block, 
HashSet::new);
+                Set<K> keys = blockAllocationMap.computeIfAbsent(block, s -> 
new HashSet<>());
                 if (!keys.isEmpty() && !log.isTraceEnabled())
                 {
                     // keys are not null, and no debug - fail fast

Reply via email to