|
47 | 47 | import org.springframework.core.annotation.AnnotationUtilsTests.WebMapping; |
48 | 48 | import org.springframework.core.testfixture.stereotype.Component; |
49 | 49 | import org.springframework.core.testfixture.stereotype.Indexed; |
50 | | -import org.springframework.lang.NonNullApi; |
51 | 50 | import org.springframework.util.MultiValueMap; |
52 | 51 |
|
53 | 52 | import static java.util.Arrays.asList; |
@@ -237,10 +236,11 @@ void isAnnotatedOnClassWithMetaDepth() { |
237 | 236 | } |
238 | 237 |
|
239 | 238 | @Test |
| 239 | + @SuppressWarnings("deprecation") |
240 | 240 | void isAnnotatedForPlainTypes() { |
241 | 241 | assertThat(isAnnotated(Order.class, Documented.class)).isTrue(); |
242 | | - assertThat(isAnnotated(NonNullApi.class, Documented.class)).isTrue(); |
243 | | - assertThat(isAnnotated(NonNullApi.class, Nonnull.class)).isTrue(); |
| 242 | + assertThat(isAnnotated(org.springframework.lang.NonNullApi.class, Documented.class)).isTrue(); |
| 243 | + assertThat(isAnnotated(org.springframework.lang.NonNullApi.class, Nonnull.class)).isTrue(); |
244 | 244 | assertThat(isAnnotated(ParametersAreNonnullByDefault.class, Nonnull.class)).isTrue(); |
245 | 245 | } |
246 | 246 |
|
@@ -277,10 +277,11 @@ void hasAnnotationOnClassWithMetaDepth() { |
277 | 277 | } |
278 | 278 |
|
279 | 279 | @Test |
| 280 | + @SuppressWarnings("deprecation") |
280 | 281 | void hasAnnotationForPlainTypes() { |
281 | 282 | assertThat(hasAnnotation(Order.class, Documented.class)).isTrue(); |
282 | | - assertThat(hasAnnotation(NonNullApi.class, Documented.class)).isTrue(); |
283 | | - assertThat(hasAnnotation(NonNullApi.class, Nonnull.class)).isTrue(); |
| 283 | + assertThat(hasAnnotation(org.springframework.lang.NonNullApi.class, Documented.class)).isTrue(); |
| 284 | + assertThat(hasAnnotation(org.springframework.lang.NonNullApi.class, Nonnull.class)).isTrue(); |
284 | 285 | assertThat(hasAnnotation(ParametersAreNonnullByDefault.class, Nonnull.class)).isTrue(); |
285 | 286 | } |
286 | 287 |
|
@@ -344,9 +345,10 @@ void getAllAnnotationAttributesOnClassWithMultipleComposedAnnotations() { |
344 | 345 | } |
345 | 346 |
|
346 | 347 | @Test |
| 348 | + @SuppressWarnings("deprecation") |
347 | 349 | void getAllAnnotationAttributesOnLangType() { |
348 | 350 | MultiValueMap<String, Object> attributes = getAllAnnotationAttributes( |
349 | | - NonNullApi.class, Nonnull.class.getName()); |
| 351 | + org.springframework.lang.NonNullApi.class, Nonnull.class.getName()); |
350 | 352 | assertThat(attributes).as("Annotation attributes map for @Nonnull on NonNullApi").isNotNull(); |
351 | 353 | assertThat(attributes.get("when")).as("value for NonNullApi").isEqualTo(List.of(When.ALWAYS)); |
352 | 354 | } |
|
0 commit comments