Synthesize annotation from defaults

This commit introduces a convenience method in AnnotationUtils for
synthesizing an annotation from its default attribute values.

TransactionalTestExecutionListener has been refactored to invoke this
new convenience method.

Issue: SPR-13087
This commit is contained in:
Sam Brannen
2015-06-20 18:27:36 +02:00
parent a0040245ca
commit d0c0d9fc5a
3 changed files with 28 additions and 8 deletions

View File

@@ -135,7 +135,7 @@ public class TransactionalTestExecutionListener extends AbstractTestExecutionLis
private static final Log logger = LogFactory.getLog(TransactionalTestExecutionListener.class);
private static final TransactionConfiguration defaultTransactionConfiguration =
AnnotationUtils.synthesizeAnnotation(Collections.<String, Object> emptyMap(), TransactionConfiguration.class, null);
AnnotationUtils.synthesizeAnnotation(TransactionConfiguration.class);
protected final TransactionAttributeSource attributeSource = new AnnotationTransactionAttributeSource();