Skip to content

Commit 2caaa81

Browse files
committed
Polishing
1 parent 21cfa0e commit 2caaa81

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

spring-core/src/main/java/org/springframework/core/annotation/AnnotationUtils.java

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ public static <A extends Annotation> Set<A> getDeclaredRepeatableAnnotations(Ann
454454
* or if it should be looked up via @{@link java.lang.annotation.Repeatable}
455455
* when running on Java 8 or higher
456456
* @param declaredMode {@code true} if only declared annotations (i.e.,
457-
* directly or indirectly present) should be considered.
457+
* directly or indirectly present) should be considered
458458
* @return the annotations found or an empty set; never {@code null}
459459
* @since 4.2
460460
* @see org.springframework.core.BridgeMethodResolver#findBridgedMethod
@@ -1277,10 +1277,8 @@ public static <A extends Annotation> A synthesizeAnnotation(A annotation, Annota
12771277
DefaultAnnotationAttributeExtractor attributeExtractor =
12781278
new DefaultAnnotationAttributeExtractor(annotation, annotatedElement);
12791279
InvocationHandler handler = new SynthesizedAnnotationInvocationHandler(attributeExtractor);
1280-
A synthesizedAnnotation = (A) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(),
1280+
return (A) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(),
12811281
new Class<?>[] {(Class<A>) annotationType, SynthesizedAnnotation.class}, handler);
1282-
1283-
return synthesizedAnnotation;
12841282
}
12851283

12861284
/**
@@ -1325,10 +1323,8 @@ public static <A extends Annotation> A synthesizeAnnotation(Map<String, Object>
13251323
MapAnnotationAttributeExtractor attributeExtractor =
13261324
new MapAnnotationAttributeExtractor(attributes, annotationType, annotatedElement);
13271325
InvocationHandler handler = new SynthesizedAnnotationInvocationHandler(attributeExtractor);
1328-
A synthesizedAnnotation = (A) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(),
1326+
return (A) Proxy.newProxyInstance(ClassUtils.getDefaultClassLoader(),
13291327
new Class<?>[] {annotationType, SynthesizedAnnotation.class}, handler);
1330-
1331-
return synthesizedAnnotation;
13321328
}
13331329

13341330
/**

0 commit comments

Comments
 (0)