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
You can also use a @Nullable annotation (of any kind in any package — for example, javax.annotation.Nullable from JSR-305) or just leverage Kotlin built-in null-safety support:
But, according to the few tests I made, @org.jspecify.annotations.Nullable can't be used in Spring FWK 6 to mark a non required dependency.
The text was updated successfully, but these errors were encountered:
sbrannen
changed the title
Mention explicitly that Spring FWK 6.x doesn't support JSpecify
Document that Spring Framework 6.x does not yet support JSpecify annotations
Mar 7, 2025
Technically, you can use any parameter-level@Nullable annotation at this point. Type-use annotations such as from JSpecify are not detected yet, that's coming in 7.0.
Maybe it could be nice to mention explicitly in documentation that Spring FWK 6.x doesn't support JSpecify.
When looking at : https://docs.spring.io/spring-framework/reference/6.2/core/beans/annotation-config/autowired.html
It says that
But, according to the few tests I made,
@org.jspecify.annotations.Nullable
can't be used in Spring FWK 6 to mark a non required dependency.The text was updated successfully, but these errors were encountered: