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
Reference allows for null, which sucks. This will certainly change for 1.1 (with
the current Reference renamed to NullableReference).
However, since JSR 305 is used, .get() is annotated as @nullable and this causes
concerns for people who emit warnings at compile time when this annotation is
present.
Introduce a .getNonnull() method which is annotated as @nonnull; if the
underlying value is null, throw an IllegalStateException.
Fixes issue #9.
Recent Grappa versions annotate Var.get() with @nullable. While technically correct, this causes spurious warnings in parsers:
In this code fragment the function f(String) cannot take a @nonnull parameter even if the actual value returned by v.get() is never null.
As a solution, a new function Var.getNonnull() could be added to Reference:
The text was updated successfully, but these errors were encountered: