Skip to content

Commit d6e9562

Browse files
committed
Revert "Prevent compilation warnings with @Nullable"
This reverts commit dc242df.
1 parent f6089af commit d6e9562

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

spring-core/src/main/java/org/springframework/lang/Nullable.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2024 the original author or authors.
2+
* Copyright 2002-2023 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -22,8 +22,9 @@
2222
import java.lang.annotation.RetentionPolicy;
2323
import java.lang.annotation.Target;
2424

25-
import javax.annotation.CheckForNull;
25+
import javax.annotation.Nonnull;
2626
import javax.annotation.meta.TypeQualifierNickname;
27+
import javax.annotation.meta.When;
2728

2829
/**
2930
* A common Spring annotation to declare that annotated elements can be {@code null}
@@ -49,7 +50,7 @@
4950
@Target({ElementType.METHOD, ElementType.PARAMETER, ElementType.FIELD})
5051
@Retention(RetentionPolicy.RUNTIME)
5152
@Documented
52-
@CheckForNull
53+
@Nonnull(when = When.MAYBE)
5354
@TypeQualifierNickname
5455
public @interface Nullable {
5556
}

0 commit comments

Comments
 (0)