Refine null-safety in the spring-core module
See gh-34150
This commit is contained in:
parent
c245e20e3f
commit
4747ab67e6
|
@ -319,7 +319,7 @@ public abstract class Assert {
|
||||||
* @throws IllegalArgumentException if the object array is {@code null} or contains no elements
|
* @throws IllegalArgumentException if the object array is {@code null} or contains no elements
|
||||||
*/
|
*/
|
||||||
@Contract("null, _ -> fail")
|
@Contract("null, _ -> fail")
|
||||||
public static void notEmpty(Object @Nullable [] array, String message) {
|
public static void notEmpty(@Nullable Object @Nullable [] array, String message) {
|
||||||
if (ObjectUtils.isEmpty(array)) {
|
if (ObjectUtils.isEmpty(array)) {
|
||||||
throw new IllegalArgumentException(message);
|
throw new IllegalArgumentException(message);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue