Merge branch '5.3.x'

# Conflicts:
#	spring-core/src/test/java/org/springframework/core/annotation/TypeMappedAnnotationTests.java
#	spring-test/src/test/java/org/springframework/test/context/junit4/TimedSpringRunnerTests.java
#	spring-test/src/test/java/org/springframework/test/util/MetaAnnotationUtilsTests.java
#	spring-test/src/test/java/org/springframework/test/util/OverriddenMetaAnnotationAttributesTests.java
This commit is contained in:
Sam Brannen
2022-07-09 16:24:04 +02:00
37 changed files with 114 additions and 140 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 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.
@@ -239,12 +239,12 @@ class ProfileValueUtilsTests {
@IfProfileValue(name = NAME, value = VALUE)
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaEnabled {
private @interface MetaEnabled {
}
@IfProfileValue(name = NAME, value = VALUE + "X")
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaDisabled {
private @interface MetaDisabled {
}
@MetaEnabled
@@ -298,13 +298,13 @@ class ProfileValueUtilsTests {
@ProfileValueSourceConfiguration(HardCodedProfileValueSource.class)
@IfProfileValue(name = NAME, value = "42")
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaEnabledWithCustomProfileValueSource {
private @interface MetaEnabledWithCustomProfileValueSource {
}
@ProfileValueSourceConfiguration(HardCodedProfileValueSource.class)
@IfProfileValue(name = NAME, value = "13")
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaDisabledWithCustomProfileValueSource {
private @interface MetaDisabledWithCustomProfileValueSource {
}
@MetaEnabledWithCustomProfileValueSource

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 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.
@@ -144,7 +144,7 @@ public class RepeatedSpringRunnerTests {
@Repeat(5)
@Retention(RetentionPolicy.RUNTIME)
private static @interface RepeatedFiveTimes {
private @interface RepeatedFiveTimes {
}
public static final class RepeatedFiveTimesViaMetaAnnotationRepeatedTestCase extends AbstractRepeatedTestCase {

View File

@@ -88,12 +88,12 @@ public class SpringJUnit4ClassRunnerTests {
@Timed(millis = 10)
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaTimed {
private @interface MetaTimed {
}
@Timed(millis = 1000)
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaTimedWithOverride {
private @interface MetaTimedWithOverride {
@AliasFor(annotation = Timed.class)
long millis() default 1000;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-2022 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.
@@ -124,7 +124,7 @@ public class RepeatedSpringRuleTests extends RepeatedSpringRunnerTests {
@Repeat(5)
@Retention(RetentionPolicy.RUNTIME)
private static @interface RepeatedFiveTimes {
private @interface RepeatedFiveTimes {
}
public static final class RepeatedFiveTimesViaMetaAnnotationRepeatedTestCase extends AbstractRepeatedTestCase {

View File

@@ -150,14 +150,14 @@ abstract class AbstractContextConfigurationUtilsTests {
@ActiveProfiles(profiles = "foo")
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public static @interface MetaLocationsFooConfig {
public @interface MetaLocationsFooConfig {
}
@ContextConfiguration
@ActiveProfiles
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public static @interface MetaLocationsFooConfigWithOverrides {
public @interface MetaLocationsFooConfigWithOverrides {
@AliasFor(annotation = ContextConfiguration.class)
String[] locations() default "/foo.xml";
@@ -170,7 +170,7 @@ abstract class AbstractContextConfigurationUtilsTests {
@ActiveProfiles(profiles = "bar")
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public static @interface MetaLocationsBarConfig {
public @interface MetaLocationsBarConfig {
}
@MetaLocationsFooConfig

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2020 the original author or authors.
* Copyright 2002-2022 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.
@@ -264,13 +264,13 @@ class ActiveProfilesUtilsTests extends AbstractContextConfigurationUtilsTests {
@ActiveProfiles(profiles = { "dog", "cat" }, inheritProfiles = false)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
private static @interface MetaAnimalsConfig {
private @interface MetaAnimalsConfig {
}
@ActiveProfiles(resolver = TestClassVerifyingActiveProfilesResolver.class)
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
private static @interface MetaResolverConfig {
private @interface MetaResolverConfig {
}
@MetaAnimalsConfig

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2022 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.
@@ -79,7 +79,7 @@ class AnnotationConfigContextLoaderUtilsTests {
@Configuration
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
private static @interface MetaConfig {
private @interface MetaConfig {
}
private static class MetaAnnotatedConfigTestCase {

View File

@@ -465,7 +465,7 @@ class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigurationUt
@ContextConfiguration
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
public static @interface SpringAppConfig {
public @interface SpringAppConfig {
@AliasFor(annotation = ContextConfiguration.class)
Class<?>[] classes() default {};

View File

@@ -366,7 +366,7 @@ class ContextLoaderUtilsContextHierarchyTests extends AbstractContextConfigurati
@ContextConfiguration("foo.xml")
@ContextHierarchy(@ContextConfiguration("bar.xml"))
@Retention(RetentionPolicy.RUNTIME)
private static @interface ContextConfigurationAndContextHierarchyOnSingleMeta {
private @interface ContextConfigurationAndContextHierarchyOnSingleMeta {
}
@ContextConfigurationAndContextHierarchyOnSingleMeta
@@ -543,17 +543,17 @@ class ContextLoaderUtilsContextHierarchyTests extends AbstractContextConfigurati
@ContextHierarchy(@ContextConfiguration("A.xml"))
@Retention(RetentionPolicy.RUNTIME)
private static @interface ContextHierarchyA {
private @interface ContextHierarchyA {
}
@ContextHierarchy(@ContextConfiguration({ "B-one.xml", "B-two.xml" }))
@Retention(RetentionPolicy.RUNTIME)
private static @interface ContextHierarchyB {
private @interface ContextHierarchyB {
}
@ContextHierarchy(@ContextConfiguration("C.xml"))
@Retention(RetentionPolicy.RUNTIME)
private static @interface ContextHierarchyC {
private @interface ContextHierarchyC {
}
@ContextHierarchyA
@@ -578,7 +578,7 @@ class ContextLoaderUtilsContextHierarchyTests extends AbstractContextConfigurati
@ContextConfiguration
@Retention(RetentionPolicy.RUNTIME)
private static @interface ContextConfigWithOverrides {
private @interface ContextConfigWithOverrides {
@AliasFor(annotation = ContextConfiguration.class)
String[] locations() default "A.xml";

View File

@@ -285,7 +285,7 @@ class TransactionalTestExecutionListenerTests {
@Transactional
@Retention(RetentionPolicy.RUNTIME)
private static @interface MetaTxWithOverride {
private @interface MetaTxWithOverride {
@AliasFor(annotation = Transactional.class)
String transactionManager() default "";

View File

@@ -142,7 +142,7 @@ class AopTestUtilsTests {
}
static interface Foo {
interface Foo {
}
static class FooImpl implements Foo {