Skip to content

Commit 129afd9

Browse files
committed
Fix OOM error
1 parent d3ab299 commit 129afd9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

impl/maven-impl/src/main/java/org/apache/maven/internal/impl/model/DefaultModelCache.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public int hashCode() {
184184
}
185185

186186
static class CachingSupplier<T> implements Supplier<T> {
187-
final Supplier<T> supplier;
187+
Supplier<T> supplier;
188188
volatile Object value;
189189

190190
CachingSupplier(Supplier<T> supplier) {
@@ -200,6 +200,7 @@ public T get() {
200200
if ((v = value) == null) {
201201
try {
202202
v = value = supplier.get();
203+
supplier = null;
203204
} catch (Exception e) {
204205
v = value = new AltRes(e);
205206
}

0 commit comments

Comments
 (0)