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

uber / NullAway / #1075
93%

Build:
DEFAULT BRANCH: master
Ran 09 Mar 2023 09:58PM 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
#1075

push

github-actions

web-flow
JSpecify generics checks for conditional expressions (#739)

For a conditional expression _e_, the type parameter nullability annotations of the true-subpart and false-subpart should match the annotations required by _e_'s context.  E.g., if _e_ is the right-hand side of an assignment, the annotations should match those for the type parameters for the assignment's left-hand side:
```java
// this is fine
A<@Nullable String> t = condition? new A<@Nullable String> : new A<@Nullable String>();
// this is bad
A<@Nullable String> t2 = condition? new A<String> : new A<String>();
// this is also bad
A<@Nullable String>  t1 = condition ? new A<String>(): new A<@Nullable String>()
```
Other contexts include returns, parameter passing, and being nested inside another conditional expression.  In our experience, it seems that `javac` captures the type parameter nullability required by _e_'s context in the type of _e_ itself.  So, our handling of conditional expressions simply checks that the types of both the true and false sub-expressions of _e_ are assignable to (i.e., a subtype of) the type of _e_, using the same machinery for checking assignments from #715.

5476 of 5880 relevant lines covered (93.13%)

0.93 hits per line

Jobs
ID Job ID Ran Files Coverage
1 #1075.1 09 Mar 2023 09:58PM UTC 0
93.13
Source Files on build #1075
Detailed source file information is not available for this build.
  • Back to Repo
  • Build #1075
  • d83b7d0f 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