Rob Winch opened SPR-15756 and commented
Currently @NonNullApi can be specified at a package level only. It would be nice if there were a way to do this at a type level as well. This is of interest to users migrating to using the annotated approach to handling null values who haven't converted their entire code base appropriately and want to avoid warnings.
For example, consider a user who wants to implement WebSessionManager. If they create an implementation, like this:
public class MyWebSessionManager implements WebSessionManager {
@Override
public Mono<WebSession> getSession(ServerWebExchange serverWebExchange) {
...
}
}
The user is given the warning:
Not annotated method overrides method annotated with @NonNullApi....
To properly resolve this warning, the user would currently need to place @NonNullApi at the package level. However, any other APIs within the package would also be impacted. It would be nice if the @NonNullApi (or similar annotation) could be placed on the type level.
Obviously in the long run, it would be good for the user to expand through the entire package. However, there is some effort involved in migrating so something supporting the type level would be valuable.
Affects: 5.0 RC2
Reference URL: https://github.com/Kotlin/KEEP/blob/jsr-305/proposals/jsr-305-custom-nullability-qualifiers.md
Issue Links:
Rob Winch opened SPR-15756 and commented
Currently
@NonNullApican be specified at a package level only. It would be nice if there were a way to do this at a type level as well. This is of interest to users migrating to using the annotated approach to handlingnullvalues who haven't converted their entire code base appropriately and want to avoid warnings.For example, consider a user who wants to implement
WebSessionManager. If they create an implementation, like this:The user is given the warning:
To properly resolve this warning, the user would currently need to place
@NonNullApiat the package level. However, any other APIs within the package would also be impacted. It would be nice if the@NonNullApi(or similar annotation) could be placed on the type level.Obviously in the long run, it would be good for the user to expand through the entire package. However, there is some effort involved in migrating so something supporting the type level would be valuable.
Affects: 5.0 RC2
Reference URL: https://github.com/Kotlin/KEEP/blob/jsr-305/proposals/jsr-305-custom-nullability-qualifiers.md
Issue Links: