You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2016/03/07 12:19:41 UTC
[jira] [Updated] (TOMEE-1465)
org.apache.openejb.util.PropertyPlaceHolderHelper.PropertiesLookup caches
properties
[ https://issues.apache.org/jira/browse/TOMEE-1465?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Romain Manni-Bucau updated TOMEE-1465:
--------------------------------------
Fix Version/s: (was: 7.0.0-M3)
7.0.0-M4
> org.apache.openejb.util.PropertyPlaceHolderHelper.PropertiesLookup caches properties
> ------------------------------------------------------------------------------------
>
> Key: TOMEE-1465
> URL: https://issues.apache.org/jira/browse/TOMEE-1465
> Project: TomEE
> Issue Type: Bug
> Affects Versions: 1.7.1, 7.0.0-M1
> Reporter: Andy Gumbrecht
> Assignee: Andy Gumbrecht
> Fix For: 1.7.4, 7.0.0-M4
>
>
> org.apache.openejb.util.PropertyPlaceHolderHelper.PropertiesLookup should not cache SystemInstance.get().getProperties() as this leads to race conditions and rare test failures where test order is not guaranteed. The following illustrates the issue.
> SystemInstance.get().setProperty("PropertyPlaceHolderTest1", "bob");
> final String bob = PropertyPlaceHolderHelper.simpleValue("j${PropertyPlaceHolderTest1}");
> SystemInstance.get().setProperty("PropertyPlaceHolderTest1", "sally");
> final String sally = PropertyPlaceHolderHelper.simpleValue("j${PropertyPlaceHolderTest1}");
> sally == "bob" <-- As PropertiesLookup is using cached properties from first call.
> Calling PropertyPlaceHolderHelper .reset() on SystemInstance.get().setProperty() calls could be an option, but would force a loader dep on core, or moving PropertyPlaceHolderHelper to loader could be an option if it does not break anything.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)