• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

uber / NullAway / #490 / 1
93%
master: 93%

Build:
DEFAULT BRANCH: master
Ran 02 Apr 2021 05:22PM UTC
Files 42
Run time 4s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Apr 2021 05:18PM UTC coverage: 89.166% (+0.008%) from 89.158%
#490.1

push

github-actions

web-flow
Add baseline support for records (#377)

Fixes #374

Avoid throwing exceptions when the source code contains records.  Since
records are a new kind of class, refactor the switch statements that
make assertions about which elements and trees represent classes.  Use
general purpose `isClassElement` and `isClassTree` methods that are
forward-compatible with records instead of enumerating `ElementKind` or
`Tree.Kind` constants.

Refactor `checkFieldInitialization` to ignore final fields.  This check
was wrongly flagging records because it couldn't analyze record
constructors properly.  Without the change to ignore final fields, this
check runs into two kinds of trouble with records:

  1. It doesn't inspect record constructors at all because they are
     generated.  `NullAway.isConstructor(MethodTree)` returns false and
     so those trees are skipped.

  2. The trees for the generated constructors don't contain explicit
     field assignments.  That's just not how those were implemented.
     Something else is responsible for assigning the fields at runtime,
     apparently.

Rather than trying to teach NullAway about record constructors
specifically, count on javac to verify that all final fields are
initialized.  Presumably, if NullAway were to complain that a constructor
did not initialize a final field, that complaint would be redundant (with
the error that javac would produce) at best and incorrect otherwise.

Co-authored-by: Manu Sridharan <msridhar@gmail.com>

3465 of 3886 relevant lines covered (89.17%)

0.89 hits per line

Source Files on job #490.1
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 490
  • e552ba76 on github
  • Prev Job for on master (##489.1)
  • Next Job for on master (##492.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc