-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/packages
#5008Closed
Copy link
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team
Description
As far as I can tell there's no way to pass nullability annotations through a generic in Java. To allow for expressing nullability of return values, we should make a breaking change to add a new NullableResult<T>, which is the same as Result<T> except for the annotations we put on the argument to success. (The breaking part being that some methods that currently have a Result parameter will change to a NullableResult parameter.)
For now I'm suppressing the UnknownNullability warning on Result<T>'s success method.
@tarrinneal I think we should do this at the same time we replace Reply with Result for #118243 since we'll be making a related breaking change for Java at that point (although this one will affect more code).
Metadata
Metadata
Assignees
Labels
P2Important issues not at the top of the work listImportant issues not at the top of the work listp: pigeonrelated to pigeon messaging codegen toolrelated to pigeon messaging codegen toolpackageflutter/packages repository. See also p: labels.flutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyAndroid applications specificallyteam-androidOwned by Android platform teamOwned by Android platform teamtriaged-androidTriaged by Android platform teamTriaged by Android platform team