Better model `Queue.isEmpty()`

Open
#1,912 3 comments 1 reaction 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
java
Domain
tooling

Research direction

Start by reading issue #1664 and the referenced Error Prone Support pull-request discussion. Work out how Queue.isEmpty() should relate to peek() and poll(), including queues that contain nulls and the inherited Collection method; done requires an agreed model and its implementation.

Written by the indexing model from the issue text.

Description

enhancement jdk-models

From #1664:

There's a similar relationship between Queue.isEmpty() and Queue.peek() / Queue.poll(), though modeling that is more complex since a Queue can contain nulls and also isEmpty() is inherited from Collection.

We should see if we can model this. Also see https://github.com/PicnicSupermarket/error-prone-support/pull/2299#issuecomment-5968625066

Dominant language
Java
Stars
4.1k
Forks
381
Avg merge
1d 2h
Merged PRs (30d)
106

Getting set up

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.

More from uber/NullAway

All issues in uber/NullAway

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.