Skip to content

Commit 598d9a4

Browse files
committed
Add test to reproduce SPR-15271
1 parent 1efcf26 commit 598d9a4

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

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

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2017 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.
@@ -204,6 +204,15 @@ public void getAllAnnotationAttributesOnClassWithMultipleComposedAnnotations() {
204204
attributes.get("value"));
205205
}
206206

207+
@Test
208+
@Ignore("To be validated by ")
209+
public void getAllMergedAnnotationsOnClassWithInterface() throws NoSuchMethodException {
210+
Method m = TransactionalServiceImpl.class.getMethod("doIt");
211+
Set<Transactional> allMergedAnnotations =
212+
getAllMergedAnnotations(m, Transactional.class);
213+
assertEquals(1, allMergedAnnotations.size());
214+
}
215+
207216
@Test
208217
public void getMergedAnnotationAttributesOnClassWithLocalAnnotation() {
209218
Class<?> element = TxConfig.class;
@@ -1272,4 +1281,17 @@ static class SpringAppConfigClass {
12721281
static class ResourceHolder {
12731282
}
12741283

1284+
interface TransactionalService {
1285+
1286+
@Transactional
1287+
void doIt();
1288+
}
1289+
1290+
class TransactionalServiceImpl implements TransactionalService {
1291+
1292+
@Override
1293+
public void doIt() {
1294+
}
1295+
}
1296+
12751297
}

0 commit comments

Comments
 (0)