uber / uber/NullAway

Support StreamEx and EntryStream

Open
#694 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
4.1k
Forks
370
Avg merge
1d 13h
Merged PRs (30d)
68

Description

StreamEx is a library that adds utility methods to streams in Java. The EntryStream class is particularly useful for using Maps with streams. For example:

EntryStream.of(map)
    .filterKeys(key -> anotherMap.containsKey(key))
    .mapKeyValue((key, value) -> doSomething(value, anotherMap.get(key)))
    .toMap()

Currently, NullAway complains that anotherMap.get() is nullable in spite of the containsKey filtering.

Would this be suitable for a contribution? Any thoughts/guidance on how challenging it might be?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The issue names StreamEx and EntryStream but does not identify NullAway files or tests. Start by reviewing existing stream and map nullability handling, then determine how the shown EntryStream example should be analyzed. Done means the example no longer produces an incorrect nullable warning, with regression coverage for that behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.