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

uber / NullAway / #1047
93%

Build:
DEFAULT BRANCH: master
Ran 31 Jan 2023 02:19AM UTC
Jobs 1
Files 78
Run time 2s
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

pending completion
#1047

push

github-actions

web-flow
Add support for external init annotations in constructors (#725)

NullAway has existing support for `-XepOpt:NullAway:ExternalInitAnnotations=...` as configuration option.
Before this PR, that option allows listing a set of class-level annotations with the following semantics:

> A list of annotations for classes that are "externally initialized." Tools like the [Cassandra Object Mapper](https://docs.datastax.com/en/developer/java-driver/3.2/manual/object_mapper/) do their own field initialization of objects with a certain annotation (like [@Table](https://docs.datastax.com/en/drivers/java/3.2/com/datastax/driver/mapping/annotations/Table.html)), after invoking the zero-argument constructor. For any class annotated with an external-init annotation, we don't check that the zero-arg constructor initializes all non-null fields.

This PR extends that configuration option to also allow annotations that are added directly to the zero-arguments
constructor of such an externally initialized class. The reason for this is that it's often desired to document why
the empty constructor exists, and doing so at the declaration site for the constructor makes code more readable than
doing so at the class declaration level.

The canonical example here is GSON serialization, which requires classes to have a private zero-arguments constructor
which is called for deserialization, in addition to their normal initializing constructors.

As a follow up to this PR landing, we will update the Wiki docs accordingly.

5277 of 5673 relevant lines covered (93.02%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1047.1 31 Jan 2023 02:19AM UTC 0
93.02
Source Files on build #1047
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1047
  • d2e4a491 on github
  • Prev Build on master
  • Next Build on master
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