Repository: incubator-tamaya Updated Branches: refs/heads/master 54d50a89a -> ec2c803e6
TAMAYA-348 Clarified/fixed init routine. Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/b22761e9 Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/b22761e9 Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/b22761e9 Branch: refs/heads/master Commit: b22761e91fe53fe2bc03a8441609b01fe4f13c7e Parents: 54d50a8 Author: Anatole Tresch <[email protected]> Authored: Tue Nov 20 08:14:07 2018 +0100 Committer: Anatole Tresch <[email protected]> Committed: Tue Nov 20 08:14:07 2018 +0100 ---------------------------------------------------------------------- .../spisupport/propertysource/EnvironmentPropertySource.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/b22761e9/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySource.java ---------------------------------------------------------------------- diff --git a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySource.java b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySource.java index 5f981ec..0308b76 100644 --- a/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySource.java +++ b/code/spi-support/src/main/java/org/apache/tamaya/spisupport/propertysource/EnvironmentPropertySource.java @@ -134,10 +134,15 @@ public class EnvironmentPropertySource extends BasePropertySource { * </pre> */ private void initFromSystemProperties() { + // Read prefix String value = System.getProperty(TAMAYA_ENVPROPS_PREFIX); if(value==null){ - prefix = System.getenv(TAMAYA_ENVPROPS_PREFIX); + value = System.getenv(TAMAYA_ENVPROPS_PREFIX); } + if(value !=null){ + this.prefix = value; + } + // Read enabled 1) for property source, 2) as default value = System.getProperty(TAMAYA_ENVPROPS_DISABLE); if(value==null){ value = System.getenv(TAMAYA_ENVPROPS_DISABLE);
