Skip to content

Instantly share code, notes, and snippets.

@agentgt
Last active August 18, 2023 20:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save agentgt/9ca96d6d127d903cfacb544a90dfae6d to your computer and use it in GitHub Desktop.
Save agentgt/9ca96d6d127d903cfacb544a90dfae6d to your computer and use it in GitHub Desktop.
Eclipse null analysis issues

Eclipse does not allow generic parameters on record attributes to be passed on to accessor methods.

public record Blah(List<String> strings) {}

public static void process(List<String> s) {}

var blah = new Blah(List.of("hello"));

process(blah.strings()); // null warning here because it does not know that strings is List<@NonNull String>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment