diff --git a/extensions/spring-di/deployment/src/main/java/io/quarkus/spring/di/deployment/SpringDIProcessor.java b/extensions/spring-di/deployment/src/main/java/io/quarkus/spring/di/deployment/SpringDIProcessor.java index abf383bd53957..50ee4c9a79770 100644 --- a/extensions/spring-di/deployment/src/main/java/io/quarkus/spring/di/deployment/SpringDIProcessor.java +++ b/extensions/spring-di/deployment/src/main/java/io/quarkus/spring/di/deployment/SpringDIProcessor.java @@ -19,6 +19,7 @@ import static org.jboss.jandex.AnnotationInstance.create; import java.util.ArrayList; +import java.util.Collections; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -211,11 +212,7 @@ public void transform(TransformationContext context) { annotationsToAdd.add(create( CDI_NAMED_ANNOTATION, annotation.target(), - new ArrayList() { - { - add(AnnotationValue.createStringValue("value", value)); - } - })); + Collections.singletonList(AnnotationValue.createStringValue("value", value)))); } } } @@ -243,11 +240,7 @@ private boolean addCDINamedAnnotation(TransformationContext context, annotationsToAdd.add(create( CDI_NAMED_ANNOTATION, context.getTarget(), - new ArrayList() { - { - add(AnnotationValue.createStringValue("value", beanName)); - } - })); + Collections.singletonList(AnnotationValue.createStringValue("value", beanName)))); return true; }