diff --git a/spring-core/src/main/java/org/springframework/lang/NonNull.java b/spring-core/src/main/java/org/springframework/lang/NonNull.java index cd4ecde458e..8ec9fb0334a 100644 --- a/spring-core/src/main/java/org/springframework/lang/NonNull.java +++ b/spring-core/src/main/java/org/springframework/lang/NonNull.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -31,8 +31,9 @@ import javax.annotation.meta.TypeQualifierNickname; *
Leverages JSR-305 meta-annotations to indicate nullability in Java to common * tools with JSR-305 support and used by Kotlin to infer nullability of Spring API. * - *
Should be used at parameter, return value, and field level. Method overrides should - * repeat parent {@code @NonNull} annotations unless they behave differently. + *
Should be used at the parameter, return value, and field level. Method + * overrides should repeat parent {@code @NonNull} annotations unless they behave + * differently. * *
Use {@code @NonNullApi} (scope = parameters + return values) and/or {@code @NonNullFields} * (scope = fields) to set the default behavior to non-nullable in order to avoid annotating diff --git a/spring-core/src/main/java/org/springframework/lang/NonNullApi.java b/spring-core/src/main/java/org/springframework/lang/NonNullApi.java index 7bf99bda65e..e2418426a6c 100644 --- a/spring-core/src/main/java/org/springframework/lang/NonNullApi.java +++ b/spring-core/src/main/java/org/springframework/lang/NonNullApi.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2017 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,8 @@ import javax.annotation.meta.TypeQualifierDefault; *
Leverages JSR-305 meta-annotations to indicate nullability in Java to common * tools with JSR-305 support and used by Kotlin to infer nullability of Spring API. * - *
Should be used at package level in association with {@link Nullable} - * annotations at parameter and return value level. + *
Should be used at the package level in association with {@link Nullable} + * annotations at the parameter and return value level. * * @author Sebastien Deleuze * @author Juergen Hoeller diff --git a/spring-core/src/main/java/org/springframework/lang/NonNullFields.java b/spring-core/src/main/java/org/springframework/lang/NonNullFields.java index 49968b9cb8c..3bbaba3b7ce 100644 --- a/spring-core/src/main/java/org/springframework/lang/NonNullFields.java +++ b/spring-core/src/main/java/org/springframework/lang/NonNullFields.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,8 +32,8 @@ import javax.annotation.meta.TypeQualifierDefault; *
Leverages JSR-305 meta-annotations to indicate nullability in Java to common * tools with JSR-305 support and used by Kotlin to infer nullability of Spring API. * - *
Should be used at package level in association with {@link Nullable} - * annotations at field level. + *
Should be used at the package level in association with {@link Nullable} + * annotations at the field level. * * @author Sebastien Deleuze * @since 5.0 diff --git a/spring-core/src/main/java/org/springframework/lang/Nullable.java b/spring-core/src/main/java/org/springframework/lang/Nullable.java index 3abedbdcc48..324d28899a9 100644 --- a/spring-core/src/main/java/org/springframework/lang/Nullable.java +++ b/spring-core/src/main/java/org/springframework/lang/Nullable.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2023 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,14 +27,15 @@ import javax.annotation.meta.TypeQualifierNickname; import javax.annotation.meta.When; /** - * A common Spring annotation to declare that annotated elements can be {@code null} under - * some circumstance. + * A common Spring annotation to declare that annotated elements can be {@code null} + * under certain circumstances. * *
Leverages JSR-305 meta-annotations to indicate nullability in Java to common * tools with JSR-305 support and used by Kotlin to infer nullability of Spring API. * - *
Should be used at parameter, return value, and field level. Methods override should - * repeat parent {@code @Nullable} annotations unless they behave differently. + *
Should be used at the parameter, return value, and field level. Method + * overrides should repeat parent {@code @Nullable} annotations unless they behave + * differently. * *
Can be used in association with {@code @NonNullApi} or {@code @NonNullFields} to * override the default non-nullable semantic to nullable.