Browse Source

Suppress deprecation warnings instead of deprecating tests

pull/30183/head
Sam Brannen 3 years ago
parent
commit
dfb4a951ae
  1. 6
      spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

6
spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2022 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.
@ -188,8 +188,8 @@ class AnnotationMetadataTests { @@ -188,8 +188,8 @@ class AnnotationMetadataTests {
* 'true' as is done in the main test above.
*/
@Test
@Deprecated
void standardAnnotationMetadata_nestedAnnotationsAsMap_false() {
@SuppressWarnings("deprecation")
AnnotationMetadata metadata = new StandardAnnotationMetadata(AnnotatedComponent.class);
AnnotationAttributes specialAttrs = (AnnotationAttributes) metadata.getAnnotationAttributes(SpecialAttr.class.getName());
Annotation[] nestedAnnoArray = (Annotation[]) specialAttrs.get("nestedAnnoArray");
@ -197,8 +197,8 @@ class AnnotationMetadataTests { @@ -197,8 +197,8 @@ class AnnotationMetadataTests {
}
@Test
@Deprecated
void metaAnnotationOverridesUsingStandardAnnotationMetadata() {
@SuppressWarnings("deprecation")
AnnotationMetadata metadata = new StandardAnnotationMetadata(ComposedConfigurationWithAttributeOverridesClass.class);
assertMetaAnnotationOverrides(metadata);
}

Loading…
Cancel
Save