Skip to content

Commit

Permalink
unlazy collections/delegates
Browse files Browse the repository at this point in the history
diffplug#1194 unlazy collections/delegates
  • Loading branch information
Lars Ködderitzsch committed May 12, 2022
1 parent 8b3e85d commit ce19481
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,10 @@ static class LiveCacheKeyImpl<T> implements LiveCache<T>, Serializable {

@Override
public void set(T value) {
if (value instanceof LazyForwardingEquality) {
// whenever we cache an instance of LazyForwardingEquality, we want to make sure that we give it
// a chance to null-out its initialization lambda (see https://github.com/diffplug/spotless/issues/1194#issuecomment-1120744842)
LazyForwardingEquality.unlazy((LazyForwardingEquality<?>) value);
}

// whenever we cache an instance of LazyForwardingEquality, we want to make sure that we give it
// a chance to null-out its initialization lambda (see https://github.com/diffplug/spotless/issues/1194#issuecomment-1120744842)
LazyForwardingEquality.unlazy(value);
daemonState.put(internalKey, value);
}

Expand Down

0 comments on commit ce19481

Please sign in to comment.