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

uber / NullAway / #993
93%

Build:
DEFAULT BRANCH: master
Ran 08 Nov 2022 08:15PM UTC
Jobs 1
Files 73
Run time 8s
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
#993

push

github-actions

web-flow
Fix Serialization: Split field initialization region into smaller regions (#658)

This PR resolves #657 by splitting the field initialization region into smaller regions. We currently only consider the value "null", for all `errors/fixes` reported in this regions. In large classes which they have many number of field, this can easily create a lot builds as they all have the value "null" for enclosing method causing conflicts in regions.

This PR generalizes the concept of enclosing method to enclosing member, and breaks a single regions of field initialization regions into a separate region for each field declaration and reduce the conflicts in regions dramatically.

The equivalent for enclosing member is described:
The enclosing member for `fix` or `error` is:
- If it is triggered inside a __method__, the enclosing member will be the __enclosing method__.
- If it is enclosed by a __field declaration statement__, the enclosing member will be the __declared field__.
- If __none__ of the above, the enclosing member will be `"null"` (used for __static initialization region__).

With the current approach the following errors will have the values below:

```java
class C {
    Field foo1 = Field(null); // Passing nullable, enclMethod = "null"
    Field foo2 = null; // assigning nullable, enclMethod = "null"
    static Field foo3 3 = null; // assigning nullable, enclMethod = "null"
    {
          foo3 = null; // assigning nullable, enclMethod = "null"
    }

   void bar(){
         this.foo1 = null; // assigning nullable, enclMethod = "bar()"
   }
}
```

From the point of view of Annotator, that is __4__ conflicts in regions as they all have  `enclMethod = "null"`.

This can be greatly improved with the new approach suggested and changed to below:
```java
class C {
    Field foo1 = Field(null); // Passing nullable, enclMember = "foo1"
    Field foo2 = null; // assigning nullable, enclMember = "foo2"
    static Field foo3 = ... (continued)

5074 of 5460 relevant lines covered (92.93%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #993.1 08 Nov 2022 08:15PM UTC 0
92.93
Source Files on build #993
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #993
  • eb62d571 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