Repository: tomee Updated Branches: refs/heads/master 936853b56 -> fa264b766
ContainerProperties.Property.IGNORED is almost a noop, cleaning system props in case of Project: http://git-wip-us.apache.org/repos/asf/tomee/repo Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/fa264b76 Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/fa264b76 Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/fa264b76 Branch: refs/heads/master Commit: fa264b7664ef9f310846ff3a6f06fb569e82c5c5 Parents: 936853b Author: Romain manni-Bucau <rmannibu...@gmail.com> Authored: Tue Feb 9 08:45:21 2016 +0100 Committer: Romain manni-Bucau <rmannibu...@gmail.com> Committed: Tue Feb 9 08:45:21 2016 +0100 ---------------------------------------------------------------------- .../java/org/apache/openejb/testing/ApplicationComposers.java | 6 +++++- .../apache/openejb/junit/ContainerAndApplicationRulesTest.java | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/tomee/blob/fa264b76/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 f9a1247..353d891 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 @@ -1352,8 +1352,12 @@ public class ApplicationComposers { if (configAnnot != null) { for (final ContainerProperties.Property p : configAnnot.value()) { final String value = p.value(); + if (ContainerProperties.Property.IGNORED.equals(value)) { + System.clearProperty(p.name()); // enforces some clean up since we can't set null in a hash table + continue; + } final String name = p.name(); - configuration.put(name, ContainerProperties.Property.IGNORED.equals(value) ? null : value); + configuration.put(name, value); if (value.contains("${")) { if (propertiesToSetAgain == null) { propertiesToSetAgain = new LinkedList<>(); http://git-wip-us.apache.org/repos/asf/tomee/blob/fa264b76/container/openejb-core/src/test/java/org/apache/openejb/junit/ContainerAndApplicationRulesTest.java ---------------------------------------------------------------------- diff --git a/container/openejb-core/src/test/java/org/apache/openejb/junit/ContainerAndApplicationRulesTest.java b/container/openejb-core/src/test/java/org/apache/openejb/junit/ContainerAndApplicationRulesTest.java index 12df385..9ecf92b 100644 --- a/container/openejb-core/src/test/java/org/apache/openejb/junit/ContainerAndApplicationRulesTest.java +++ b/container/openejb-core/src/test/java/org/apache/openejb/junit/ContainerAndApplicationRulesTest.java @@ -17,6 +17,7 @@ package org.apache.openejb.junit; import org.apache.openejb.api.configuration.PersistenceUnitDefinition; +import org.apache.openejb.testing.ContainerProperties; import org.junit.Rule; import org.junit.Test; import org.junit.rules.RuleChain; @@ -41,6 +42,7 @@ public class ContainerAndApplicationRulesTest { assertNull(instanceContainer.getInstance(Container.class).ignored); } + @ContainerProperties(@ContainerProperties.Property(name = "openejb.conf.file", value = ContainerProperties.Property.IGNORED)) @org.apache.openejb.testing.Classes(cdi = true, value = Ignored.class) // @Classes invalid for a container public static class Container { @Inject