You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by tv...@apache.org on 2022/01/03 15:52:34 UTC

[commons-jcs] branch release-3.1 updated: Fix OOM

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 <tv...@apache.org>
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