@@ -702,6 +702,7 @@ void streamTypeHierarchyAndEnclosingClassesFromNonAnnotatedStaticNestedClassWith
702
702
SearchStrategy .TYPE_HIERARCHY_AND_ENCLOSING_CLASSES ).stream ().map (MergedAnnotation ::getType );
703
703
assertThat (classes ).containsExactly (Component .class , Indexed .class );
704
704
}
705
+
705
706
@ Test
706
707
void getFromMethodWithMethodAnnotationOnLeaf () throws Exception {
707
708
Method method = Leaf .class .getMethod ("annotatedOnLeaf" );
@@ -776,24 +777,19 @@ void getFromMethodWithNotAnnotated() throws Exception {
776
777
777
778
@ Test
778
779
void getFromMethodWithBridgeMethod () throws Exception {
779
- Method method = TransactionalStringGeneric .class .getMethod ("something" ,
780
- Object .class );
780
+ Method method = TransactionalStringGeneric .class .getMethod ("something" , Object .class );
781
781
assertThat (method .isBridge ()).isTrue ();
782
782
assertThat (method .getAnnotation (Order .class )).isNull ();
783
- assertThat (MergedAnnotations .from (method ).get (Order .class ).getDistance ()).isEqualTo (
784
- -1 );
783
+ assertThat (MergedAnnotations .from (method ).get (Order .class ).getDistance ()).isEqualTo (-1 );
785
784
assertThat (MergedAnnotations .from (method , SearchStrategy .TYPE_HIERARCHY ).get (
786
785
Order .class ).getDistance ()).isEqualTo (0 );
787
786
boolean runningInEclipse = Arrays .stream (
788
787
new Exception ().getStackTrace ()).anyMatch (
789
788
element -> element .getClassName ().startsWith ("org.eclipse.jdt" ));
790
- // As of JDK 8, invoking getAnnotation() on a bridge method actually
791
- // finds an
789
+ // As of JDK 8, invoking getAnnotation() on a bridge method actually finds an
792
790
// annotation on its 'bridged' method [1]; however, the Eclipse compiler
793
- // will not
794
- // support this until Eclipse 4.9 [2]. Thus, we effectively ignore the
795
- // following
796
- // assertion if the test is currently executing within the Eclipse IDE.
791
+ // will not support this until Eclipse 4.9 [2]. Thus, we effectively ignore the
792
+ // following assertion if the test is currently executing within the Eclipse IDE.
797
793
// [1] https://bugs.openjdk.java.net/browse/JDK-6695379
798
794
// [2] https://bugs.eclipse.org/bugs/show_bug.cgi?id=495396
799
795
if (!runningInEclipse ) {
@@ -843,8 +839,7 @@ void getFromMethodWithGenericSuperclass() throws Exception {
843
839
844
840
@ Test
845
841
void getFromMethodWithInterfaceOnSuper () throws Exception {
846
- Method method = SubOfImplementsInterfaceWithAnnotatedMethod .class .getMethod (
847
- "foo" );
842
+ Method method = SubOfImplementsInterfaceWithAnnotatedMethod .class .getMethod ("foo" );
848
843
assertThat (MergedAnnotations .from (method , SearchStrategy .TYPE_HIERARCHY ).get (
849
844
Order .class ).getDistance ()).isEqualTo (0 );
850
845
}
@@ -1369,8 +1364,10 @@ void synthesizeAlreadySynthesized() throws Exception {
1369
1364
Method method = WebController .class .getMethod ("handleMappedWithValueAttribute" );
1370
1365
RequestMapping webMapping = method .getAnnotation (RequestMapping .class );
1371
1366
assertThat (webMapping ).isNotNull ();
1367
+
1372
1368
RequestMapping synthesizedWebMapping = MergedAnnotation .from (webMapping ).synthesize ();
1373
1369
RequestMapping synthesizedAgainWebMapping = MergedAnnotation .from (synthesizedWebMapping ).synthesize ();
1370
+
1374
1371
assertThat (synthesizedWebMapping ).isInstanceOf (SynthesizedAnnotation .class );
1375
1372
assertThat (synthesizedAgainWebMapping ).isInstanceOf (SynthesizedAnnotation .class );
1376
1373
assertThat (synthesizedWebMapping ).isEqualTo (synthesizedAgainWebMapping );
0 commit comments