You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by rm...@apache.org on 2015/11/20 21:38:09 UTC
tomee git commit: for app rule we need to propagate the workaround
for lazy test instance usage
Repository: tomee
Updated Branches:
refs/heads/master 7993bfd75 -> 45cb0ee73
for app rule we need to propagate the workaround for lazy test instance usage
Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/45cb0ee7
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/45cb0ee7
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/45cb0ee7
Branch: refs/heads/master
Commit: 45cb0ee730914e59d063f96f533f6cceb384f2b0
Parents: 7993bfd
Author: Romain Manni-Bucau <rm...@gmail.com>
Authored: Fri Nov 20 12:37:55 2015 -0800
Committer: Romain Manni-Bucau <rm...@gmail.com>
Committed: Fri Nov 20 12:38:03 2015 -0800
----------------------------------------------------------------------
.../java/org/apache/openejb/testing/ApplicationComposers.java | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/tomee/blob/45cb0ee7/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
----------------------------------------------------------------------
diff --git a/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java b/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
index ef07bf9..1a85edd 100644
--- a/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
+++ b/container/openejb-core/src/main/java/org/apache/openejb/testing/ApplicationComposers.java
@@ -732,7 +732,12 @@ public class ApplicationComposers {
System.getProperties().put(OPENEJB_APPLICATION_COMPOSER_CONTEXT, appContext.getGlobalJndiContext());
// test injections
- final ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
+ ClassFinder testClassFinder = testClassFinders.remove(inputTestInstance);
+ if (testClassFinder == null) {
+ testClassFinders.put(inputTestInstance, testClassFinders.remove(this));
+ testClassFinder = testClassFinders.remove(inputTestInstance);
+ }
+
final List<Field> fields = new ArrayList<>(testClassFinder.findAnnotatedFields(AppResource.class));
fields.addAll(testClassFinder.findAnnotatedFields(org.apache.openejb.junit.AppResource.class));
for (final Field field : fields) {