Change code to make Eclipse compiler happy

Extract a local variable to fix compiler error that only seems to
happen in Eclipse.
This commit is contained in:
Phillip Webb
2026-08-24 19:07:53 -07:00
parent 6dbc7e9a51
commit 068bb037bf
@@ -138,7 +138,8 @@ public class ContextPairs {
*/
@SuppressWarnings("NullAway") // Doesn't detect lambda with correct nullability
public <V> void addMapEntries(Function<T, Map<String, V>> extractor) {
add(extractor.andThen(Map::entrySet), Map.Entry::getKey, Map.Entry::getValue);
Function<T, @Nullable Iterable<Map.Entry<String, V>>> elementsExtractor = extractor.andThen(Map::entrySet);
add(elementsExtractor, Map.Entry::getKey, Map.Entry::getValue);
}
/**