Remove superfluous static declaration for enum, annotation, & interface
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -87,12 +87,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 {
|
||||
|
||||
long millis() default 1000;
|
||||
}
|
||||
|
||||
@@ -112,12 +112,12 @@ public class TimedSpringRunnerTests {
|
||||
|
||||
@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 {
|
||||
long millis() default 1000;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -149,14 +149,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 {
|
||||
|
||||
String[] locations() default "/foo.xml";
|
||||
|
||||
@@ -167,7 +167,7 @@ abstract class AbstractContextConfigurationUtilsTests {
|
||||
@ActiveProfiles(profiles = "bar")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public static @interface MetaLocationsBarConfig {
|
||||
public @interface MetaLocationsBarConfig {
|
||||
}
|
||||
|
||||
@MetaLocationsFooConfig
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -464,7 +464,7 @@ class BootstrapTestUtilsMergedConfigTests extends AbstractContextConfigurationUt
|
||||
@ContextConfiguration
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
public static @interface SpringAppConfig {
|
||||
public @interface SpringAppConfig {
|
||||
|
||||
Class<?>[] classes() default {};
|
||||
}
|
||||
|
||||
@@ -365,7 +365,7 @@ class ContextLoaderUtilsContextHierarchyTests extends AbstractContextConfigurati
|
||||
@ContextConfiguration("foo.xml")
|
||||
@ContextHierarchy(@ContextConfiguration("bar.xml"))
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
private static @interface ContextConfigurationAndContextHierarchyOnSingleMeta {
|
||||
private @interface ContextConfigurationAndContextHierarchyOnSingleMeta {
|
||||
}
|
||||
|
||||
@ContextConfigurationAndContextHierarchyOnSingleMeta
|
||||
@@ -542,17 +542,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
|
||||
@@ -577,7 +577,7 @@ class ContextLoaderUtilsContextHierarchyTests extends AbstractContextConfigurati
|
||||
|
||||
@ContextConfiguration
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
private static @interface ContextConfigWithOverrides {
|
||||
private @interface ContextConfigWithOverrides {
|
||||
|
||||
String[] locations() default "A.xml";
|
||||
}
|
||||
|
||||
@@ -285,7 +285,7 @@ class TransactionalTestExecutionListenerTests {
|
||||
|
||||
@Transactional
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
private static @interface MetaTxWithOverride {
|
||||
private @interface MetaTxWithOverride {
|
||||
|
||||
@AliasFor(annotation = Transactional.class, attribute = "value")
|
||||
String transactionManager() default "";
|
||||
|
||||
@@ -142,7 +142,7 @@ class AopTestUtilsTests {
|
||||
}
|
||||
|
||||
|
||||
static interface Foo {
|
||||
interface Foo {
|
||||
}
|
||||
|
||||
static class FooImpl implements Foo {
|
||||
|
||||
@@ -480,7 +480,7 @@ class MetaAnnotationUtilsTests {
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Documented
|
||||
static @interface Meta1 {
|
||||
@interface Meta1 {
|
||||
}
|
||||
|
||||
@Component(value = "meta2")
|
||||
@@ -488,7 +488,7 @@ class MetaAnnotationUtilsTests {
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Documented
|
||||
static @interface Meta2 {
|
||||
@interface Meta2 {
|
||||
}
|
||||
|
||||
@Meta2
|
||||
@@ -530,7 +530,7 @@ class MetaAnnotationUtilsTests {
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
@Target(ElementType.TYPE)
|
||||
@Documented
|
||||
static @interface MetaConfig {
|
||||
@interface MetaConfig {
|
||||
|
||||
static class DevConfig {
|
||||
}
|
||||
@@ -555,7 +555,7 @@ class MetaAnnotationUtilsTests {
|
||||
}
|
||||
|
||||
@Meta1
|
||||
static interface InterfaceWithMetaAnnotation {
|
||||
interface InterfaceWithMetaAnnotation {
|
||||
}
|
||||
|
||||
static class ClassWithMetaAnnotatedInterface implements InterfaceWithMetaAnnotation {
|
||||
@@ -592,26 +592,26 @@ class MetaAnnotationUtilsTests {
|
||||
// -------------------------------------------------------------------------
|
||||
|
||||
@Transactional
|
||||
static interface InheritedAnnotationInterface {
|
||||
interface InheritedAnnotationInterface {
|
||||
}
|
||||
|
||||
static interface SubInheritedAnnotationInterface extends InheritedAnnotationInterface {
|
||||
interface SubInheritedAnnotationInterface extends InheritedAnnotationInterface {
|
||||
}
|
||||
|
||||
static interface SubSubInheritedAnnotationInterface extends SubInheritedAnnotationInterface {
|
||||
interface SubSubInheritedAnnotationInterface extends SubInheritedAnnotationInterface {
|
||||
}
|
||||
|
||||
@Order
|
||||
static interface NonInheritedAnnotationInterface {
|
||||
interface NonInheritedAnnotationInterface {
|
||||
}
|
||||
|
||||
static interface SubNonInheritedAnnotationInterface extends NonInheritedAnnotationInterface {
|
||||
interface SubNonInheritedAnnotationInterface extends NonInheritedAnnotationInterface {
|
||||
}
|
||||
|
||||
static class NonAnnotatedClass {
|
||||
}
|
||||
|
||||
static interface NonAnnotatedInterface {
|
||||
interface NonAnnotatedInterface {
|
||||
}
|
||||
|
||||
@Transactional
|
||||
|
||||
@@ -125,7 +125,7 @@ class OverriddenMetaAnnotationAttributesTests {
|
||||
|
||||
@ContextConfiguration("foo.xml")
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
static @interface MetaValueConfig {
|
||||
@interface MetaValueConfig {
|
||||
|
||||
String[] value() default {};
|
||||
}
|
||||
@@ -140,7 +140,7 @@ class OverriddenMetaAnnotationAttributesTests {
|
||||
|
||||
@ContextConfiguration(locations = "foo.xml", inheritLocations = false)
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
static @interface MetaLocationsConfig {
|
||||
@interface MetaLocationsConfig {
|
||||
|
||||
String[] locations() default {};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user