Reuse Function.identity()

This commit is contained in:
Gary Gregory 2024-10-29 13:16:27 -04:00
parent 70521e0207
commit 1898dffcdb
1 changed files with 2 additions and 1 deletions

View File

@ -37,6 +37,7 @@ import java.util.Iterator;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.atomic.AtomicReference; import java.util.concurrent.atomic.AtomicReference;
import java.util.function.Function;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.apache.hc.client5.http.utils.DateUtils; import org.apache.hc.client5.http.utils.DateUtils;
@ -449,7 +450,7 @@ public class HttpCacheEntry implements MessageHeaders, Serializable {
@Deprecated @Deprecated
public Map<String, String> getVariantMap() { public Map<String, String> getVariantMap() {
return variants != null ? variants.stream() return variants != null ? variants.stream()
.collect(Collectors.toMap(e -> e, e -> e + requestURI)) : Collections.emptyMap(); .collect(Collectors.toMap(Function.identity(), e -> e + requestURI)) : Collections.emptyMap();
} }
/** /**