[arquillian-issues] [JBoss JIRA] (ARQ-2107) ResourceInjectionEnricher doesn't consult the @Resource(lookup = "...") value
Bartosz Majsak (JIRA)
issues at jboss.org
Tue Jul 18 11:01:01 EDT 2017
[ https://issues.jboss.org/browse/ARQ-2107?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bartosz Majsak updated ARQ-2107:
--------------------------------
Affects Version/s: 1.1.13.Final
> ResourceInjectionEnricher doesn't consult the @Resource(lookup = "...") value
> -----------------------------------------------------------------------------
>
> Key: ARQ-2107
> URL: https://issues.jboss.org/browse/ARQ-2107
> Project: Arquillian
> Issue Type: Bug
> Components: Runtime Enricher SPI
> Affects Versions: 1.1.13.Final
> Reporter: Ladislav Thon
>
> The {{ResourceInjectionEnricher}} supports injecting the test instance fields annotated with {{javax.annotation.Resource}}. However, looking at the {{ResourceInjectionEnricher.getResourceName}} method, it only consults the annotation's {{name}} and {{mappedName}} attributes, falling back to some default afterward. The annotation's {{lookup}} attribute isn't considered at all. This might be because the {{lookup}} attribute was only added in Java EE 6 / Java SE 7, and Arquillian still supports Java 6, but that can be solved with a little bit of reflection.
> I don't know if this omission was intentional or not, but it could have easily gone unnoticed for a long while, because if CDI is present, the {{CDIInjectionEnricher}} will inject such field. However, CDI doesn't necessarily have to be present -- for example with WildFly Swarm.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
More information about the arquillian-issues
mailing list