You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
UseMapOf converts HashMap with null keys/values to Map.of() which throws NullPointerException #1092
Both throw NullPointerException at runtime because Map.of() rejects null keys and values.
What is the full stack trace of any errors you encountered?
java.lang.NullPointerException
at java.base/java.util.Objects.requireNonNull(Objects.java:220)
at java.base/java.util.ImmutableCollections$MapN.<init>(ImmutableCollections.java:1437)
at java.base/java.util.Map.of(Map.java:1384)
Are you interested in contributing a fix to OpenRewrite?
Activity
Skip `UseMapOf` when `put()` argument is a null literal (openrewrite#…