CAMEL-8115: Properties component - Include default functions to lookup from ENV / SYS etc
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/658b9949 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/658b9949 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/658b9949 Branch: refs/heads/camel-2.14.x Commit: 658b9949716397709a97e89423647a3065d91063 Parents: f9b44bc Author: Claus Ibsen <davscl...@apache.org> Authored: Tue Dec 9 15:29:16 2014 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Tue Dec 9 15:35:51 2014 +0100 ---------------------------------------------------------------------- .../camel/component/properties/PropertiesComponent.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/658b9949/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java ---------------------------------------------------------------------- diff --git a/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java b/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java index 0c2f05f..9cd3f92 100644 --- a/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java +++ b/camel-core/src/main/java/org/apache/camel/component/properties/PropertiesComponent.java @@ -88,13 +88,19 @@ public class PropertiesComponent extends DefaultComponent { private Properties overrideProperties; public PropertiesComponent() { + // include out of the box functions + addFunction(new EnvPropertiesFunction()); + addFunction(new SysPropertiesFunction()); + addFunction(new ServicePropertiesFunction()); } public PropertiesComponent(String location) { + this(); setLocation(location); } public PropertiesComponent(String... locations) { + this(); setLocations(locations); } @@ -346,17 +352,11 @@ public class PropertiesComponent extends DefaultComponent { if (propertiesParser instanceof DefaultPropertiesParser) { ((DefaultPropertiesParser) propertiesParser).setPropertiesComponent(this); } - - // include out of the box functions - addFunction(new EnvPropertiesFunction()); - addFunction(new SysPropertiesFunction()); - addFunction(new ServicePropertiesFunction()); } @Override protected void doStop() throws Exception { cacheMap.clear(); - functions.clear(); super.doStop(); }