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

uber / NullAway / #1062
93%

Build:
DEFAULT BRANCH: master
Ran 07 Feb 2023 06:04PM UTC
Jobs 1
Files 78
Run time 5s
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
#1062

push

github-actions

web-flow
JSpecify: initial checks for generic type compatibility at assignments (#715)

This pull request adds the identical type parameter nullability checks for both sides of an assignment. 
for example
`NullableTypeParam<@Nullable String> nullableTypeParam = new NullableTypeParam<String>();` should generate an error as the type parameters of both sides of the assignment do not have the same Nullability annotations.
This PR covers the following cases:
- checks for the variable instantiation `A<String> a = new A<@Nullable String>();`
- checks for the assignments
`A<@Nullable String> t1 = new A<@Nullable String>();
A<String> t2;
t2 = t1;`
- LHS and RHS with the exact same types
`A<String> a = new A<@Nullable String>();`
- RHS being a subtype of LHS
```java
class Test {
  class D<P extends @Nullable Object> {}
  class B<P extends @Nullable Object> extends D<P>{}
  void test1() {
      // BUG: Diagnostic contains: Cannot assign from type
      D<String> f = new B<@Nullable String>();
  }
}
```
- nested generics 
`A<B<String>, String> a = new A<B<@Nullable String>>();`

The PR does not handle pseudo-assignments due to parameter passing / returns; that support will come in a follow-up PR.  Also note that this PR only changes NullAway behavior when `JSpecifyMode` is enabled.

Additionally, we don't currently have functioning support for checking compatibility of method references, lambdas, or inferred generic instantiations, but this PR includes tests to show that those cases do not produce false positive errors (just false negatives / missed detections).

5402 of 5801 relevant lines covered (93.12%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1062.1 07 Feb 2023 06:04PM UTC 0
93.12
Source Files on build #1062
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1062
  • 14d3693a 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