Skip to content

Commit ce19481

Browse files
author
Lars Ködderitzsch
committed
unlazy collections/delegates
#1194 unlazy collections/delegates
1 parent 8b3e85d commit ce19481

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JvmLocalCache.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,10 @@ static class LiveCacheKeyImpl<T> implements LiveCache<T>, Serializable {
5454

5555
@Override
5656
public void set(T value) {
57-
if (value instanceof LazyForwardingEquality) {
58-
// whenever we cache an instance of LazyForwardingEquality, we want to make sure that we give it
59-
// a chance to null-out its initialization lambda (see https://github.com/diffplug/spotless/issues/1194#issuecomment-1120744842)
60-
LazyForwardingEquality.unlazy((LazyForwardingEquality<?>) value);
61-
}
57+
58+
// whenever we cache an instance of LazyForwardingEquality, we want to make sure that we give it
59+
// a chance to null-out its initialization lambda (see https://github.com/diffplug/spotless/issues/1194#issuecomment-1120744842)
60+
LazyForwardingEquality.unlazy(value);
6261
daemonState.put(internalKey, value);
6362
}
6463

0 commit comments

Comments
 (0)