Skip to content

Commit 6812de7

Browse files
committed
Polishing
1 parent 49fd7c9 commit 6812de7

File tree

1 file changed

+13
-26
lines changed

1 file changed

+13
-26
lines changed

spring-core/src/test/java/org/springframework/core/annotation/TypeMappedAnnotationTests.java

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,8 +29,8 @@
2929
import static org.assertj.core.api.Assertions.assertThat;
3030

3131
/**
32-
* Tests for {@link TypeMappedAnnotation}. See also
33-
* {@link MergedAnnotationsTests} for a much more extensive collection of tests.
32+
* Tests for {@link TypeMappedAnnotation}. See also {@link MergedAnnotationsTests}
33+
* for a much more extensive collection of tests.
3434
*
3535
* @author Phillip Webb
3636
*/
@@ -145,75 +145,66 @@ private AnnotationTypeMapping getMapping(Annotation annotation,
145145
}
146146

147147
@Retention(RetentionPolicy.RUNTIME)
148-
static @interface ExplicitMirror {
148+
@interface ExplicitMirror {
149149

150150
@AliasFor("b")
151151
String a() default "";
152152

153153
@AliasFor("a")
154154
String b() default "";
155-
156155
}
157156

158157
@ExplicitMirror(a = "test")
159158
static class WithExplicitMirrorA {
160-
161159
}
162160

163161
@ExplicitMirror(b = "test")
164162
static class WithExplicitMirrorB {
165-
166163
}
167164

168165
@Retention(RetentionPolicy.RUNTIME)
169166
@ExplicitAliasMetaAnnotationTarget(nonAliased = "nonAliased")
170-
static @interface ExplicitAliasToMetaAnnotation {
167+
@interface ExplicitAliasToMetaAnnotation {
171168

172169
@AliasFor(annotation = ExplicitAliasMetaAnnotationTarget.class)
173170
String aliased() default "";
174-
175171
}
176172

177173
@Retention(RetentionPolicy.RUNTIME)
178-
static @interface ExplicitAliasMetaAnnotationTarget {
174+
@interface ExplicitAliasMetaAnnotationTarget {
179175

180176
String aliased() default "";
181177

182178
String nonAliased() default "";
183-
184179
}
185180

186181
@ExplicitAliasToMetaAnnotation(aliased = "aliased")
187182
private static class WithExplicitAliasToMetaAnnotation {
188-
189183
}
190184

191185
@Retention(RetentionPolicy.RUNTIME)
192-
@ConventionAliasMetaAnnotationTarget
193-
static @interface ConventionAliasToMetaAnnotation {
186+
@interface ConventionAliasMetaAnnotationTarget {
194187

195188
String value() default "";
196189

197190
String convention() default "";
198-
199191
}
200192

201193
@Retention(RetentionPolicy.RUNTIME)
202-
static @interface ConventionAliasMetaAnnotationTarget {
194+
@ConventionAliasMetaAnnotationTarget
195+
@interface ConventionAliasToMetaAnnotation {
203196

204197
String value() default "";
205198

206199
String convention() default "";
207-
208200
}
209201

210202
@ConventionAliasToMetaAnnotation(value = "value", convention = "convention")
211203
private static class WithConventionAliasToMetaAnnotation {
212-
213204
}
214205

215206
@Retention(RetentionPolicy.RUNTIME)
216-
static @interface ArrayTypes {
207+
@interface ArrayTypes {
217208

218209
String[] stringValue();
219210

@@ -238,32 +229,28 @@ private static class WithConventionAliasToMetaAnnotation {
238229
ExplicitMirror[] annotationValue();
239230

240231
ExampleEnum[] enumValue();
241-
242232
}
243233

244234
enum ExampleEnum {ONE,TWO,THREE}
245235

246236
@Retention(RetentionPolicy.RUNTIME)
247-
static @interface NestedContainer {
237+
@interface NestedContainer {
248238

249239
Nested value();
250-
251240
}
252241

253242
@Retention(RetentionPolicy.RUNTIME)
254-
static @interface Nested {
243+
@interface Nested {
255244

256245
String value() default "";
257-
258246
}
259247

260248
@Retention(RetentionPolicy.RUNTIME)
261-
static @interface ClassAttributes {
249+
@interface ClassAttributes {
262250

263251
Class<?> classValue();
264252

265253
Class<?>[] classArrayValue();
266-
267254
}
268255

269256
}

0 commit comments

Comments
 (0)