[
https://issues.apache.org/jira/browse/TOMEE-1359?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14146150#comment-14146150
]
Andy Gumbrecht commented on TOMEE-1359:
---------------------------------------
The test declares several app deployments. The ContainerSystem deployments list
the following BeanContexts, which looks right - but as you say may be wrong
(and should be the focus if it is):
yellow_com.fqn.ApplicationApiTest
blue_com.fqn.ApplicationApiTest
orange_com.fqn.ApplicationApiTest
green_com.fqn.ApplicationApiTest
We are looking for 'orange' because that is the actual test app. So if we
provide 'appname_ + className' as the single criteria to locate this
AppContext, and only an iterator to find it then we are just using luck.
On Java 8 we just get lucky that 'orange_com.fqn.ApplicationApiTest' is first
in the list, on Java 7 it's 'green_com.fqn.ApplicationApiTest', so the tests
clearly fail.
> TomEEInjectionEnricher does not always return correct AppContext
> ----------------------------------------------------------------
>
> Key: TOMEE-1359
> URL: https://issues.apache.org/jira/browse/TOMEE-1359
> Project: TomEE
> Issue Type: Bug
> Components: TomEE Arquillian Adapters
> Affects Versions: 2.0.0, 1.7.1, 2.0.0-Milestone-1
> Environment: Java 7 and 8
> Reporter: Andy Gumbrecht
> Assignee: Andy Gumbrecht
> Fix For: 2.0.0-Milestone-1, 1.7.2
>
>
> TomEEInjectionEnricher does not always return correct AppContext - The first
> context for which a BeanContext is found is returned. This has in fact been
> an arbitrary result of a List iteration (which has no guarantee of order) and
> has only come to light in differences between Java 7 and 8.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)