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

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

Build:
DEFAULT BRANCH: master
Ran 09 Mar 2023 09:58PM UTC
Files 78
Run time 1s
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

09 Mar 2023 09:58PM UTC coverage: 93.129% (+0.03%) from 93.101%
#1075.1

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

Source Files on job #1075.1
  • Tree
  • List 0
  • Changed 2
  • Source Changed 2
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 1075
  • d83b7d0f on github
  • Prev Job for on master (##1074.1)
  • Next Job for on master (##1076.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