jstuyts commented on PR #1093:
URL: https://github.com/apache/wicket/pull/1093#issuecomment-2633297946

   > @jstuyts: Are you consuming Wicket APIs from Kotlin? If so, does adding 
these `@Nonnull`s already help with null-safety in Kotlin?
   
   @theigl Yes, I do. I just tested, and no, they unfortunately don't. Of the 
many options, I chose the one that is not supported by Kotlin (Jakarta 
annotations are not listed on this page and not in the code linked to): 
https://kotlinlang.org/docs/java-interop.html#nullability-annotations
   
   I switched to JSpecify, and although that does result in warnings in Kotlin, 
it won't allow me to specify `@NonNull` everywhere where the Jakarta annotation 
used to be. The compiler trips over non-simple names: fully-qualified names and 
nested types. For example: `@NonNull WebResponse.CacheScope scope` results in a 
compile error. I had to remove annotations because of this.
   
   So it seems to me that JSpecify is not in a usable state yet. Is there a 
preference for one of the other supported annotations? I don't see a good 
candidate as most of them are part of a library that is not specifically meant 
to strengthen contracts, is vendor-specific or is (as good as) obsolete.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to