From dfb4a951ae785403171e0e118cdd78dd98353f32 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Thu, 23 Mar 2023 16:55:12 +0100 Subject: [PATCH] Suppress deprecation warnings instead of deprecating tests --- .../springframework/core/type/AnnotationMetadataTests.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java index 2066b056a74..1eb126fc027 100644 --- a/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java +++ b/spring-core/src/test/java/org/springframework/core/type/AnnotationMetadataTests.java @@ -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 { * '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 { } @Test - @Deprecated void metaAnnotationOverridesUsingStandardAnnotationMetadata() { + @SuppressWarnings("deprecation") AnnotationMetadata metadata = new StandardAnnotationMetadata(ComposedConfigurationWithAttributeOverridesClass.class); assertMetaAnnotationOverrides(metadata); }