javaee-samples / javaee7-samples

Java EE 7 Samples
https://travis-ci.org/javaee-samples/javaee7-samples
Other
2.51k stars 1.66k forks source link

Use the correct instances to destroy CDI beans obtained from Instances. #351

Closed robertpanzer closed 7 years ago

robertpanzer commented 8 years ago

Some CDI tests destroy CDI managed beans retrieved from an Instance at the wrong Instance, so that TomEE/OWB throws a NullPointerException. This PR fixes this by destroying the beans at the Instances where they were got from.

arjantijms commented 7 years ago

Looks good, sorry that this had been left open for such a long time.