You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unexpected errors from contract checking with !null return value #1444
publicclassDynamicContainer {
finalStream<? extendsDynamicNode> children;
DynamicContainer(DefaultConfigurationconfiguration) {
this.children = Preconditions.notNull(configuration.children, "children must not be null");
}
// ...
}
The notNull method is used ~500 times in the codebase and this is the only occurrence where 0.13.0 fails. Maybe it's due to configuration.children being generic with a wildcard (@Nullable Stream<? extends DynamicNode>)?
Hi @marcphilipp thanks for the report. What warning are you getting? I think this may not be related directly to the CheckContracts=true flag. Can you see if you still get the warning after removing that flag?
I dug in a bit and reproduced the error, and it's not related to contracts. It's a bug in our generic method call inference, which I guess was introduced in 0.13.0. Will look into this.
@marcphilipp would it be helpful to you if we cut a release with the fix for this issue? Please let us know. I check and with this fix, junit-framework compiles successfully. Thanks!
Activity
msridhar commentedon Jan 24, 2026
Hi @marcphilipp thanks for the report. What warning are you getting? I think this may not be related directly to the
CheckContracts=trueflag. Can you see if you still get the warning after removing that flag?msridhar commentedon Jan 24, 2026
I dug in a bit and reproduced the error, and it's not related to contracts. It's a bug in our generic method call inference, which I guess was introduced in 0.13.0. Will look into this.
msridhar commentedon Jan 25, 2026
@marcphilipp would it be helpful to you if we cut a release with the fix for this issue? Please let us know. I check and with this fix, junit-framework compiles successfully. Thanks!
Substitute inferred `@NonNull` types for generic method inference (#1445
marcphilipp commentedon Jan 25, 2026
There's no rush on our end but we'd certainly update right away if you do cut a release.
msridhar commentedon Jan 27, 2026
@marcphilipp we just put out NullAway 0.13.1 with the fix for this one.