You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/12/30 11:48:31 UTC

[04/11] camel git commit: Moved setter methods to the bottom.

Moved setter methods to the bottom.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/d74fe42b
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/d74fe42b
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/d74fe42b

Branch: refs/heads/master
Commit: d74fe42b5f3721bbcaf8daae0b69c7452378aada
Parents: 5b3b85e
Author: Marius Thøring <mt...@gmail.com>
Authored: Fri Dec 26 18:25:37 2014 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Dec 30 11:47:29 2014 +0100

----------------------------------------------------------------------
 .../jasypt/JasyptPropertiesParser.java          | 37 ++++++++++----------
 1 file changed, 18 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/d74fe42b/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java
----------------------------------------------------------------------
diff --git a/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java b/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java
index 76cc180..e0e40fc 100755
--- a/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java
+++ b/components/camel-jasypt/src/main/java/org/apache/camel/component/jasypt/JasyptPropertiesParser.java
@@ -51,21 +51,6 @@ public class JasyptPropertiesParser extends DefaultPropertiesParser {
         pattern = Pattern.compile(regex);
     }
 
-    public void setPassword(String password) {
-        // lookup password as either environment or JVM system property
-        if (password.startsWith("sysenv:")) {
-            password = System.getenv(ObjectHelper.after(password, "sysenv:"));
-        }
-        if (password.startsWith("sys:")) {
-            password = System.getProperty(ObjectHelper.after(password, "sys:"));
-        }
-        this.password = password;
-    }
-
-    public void setAlgorithm(String algorithm) {
-        this.algorithm = algorithm;
-    }
-
     private synchronized void initEncryptor() {
         if (encryptor == null) {
             ObjectHelper.notEmpty("password", password);
@@ -81,10 +66,6 @@ public class JasyptPropertiesParser extends DefaultPropertiesParser {
         }
     }
 
-    public void setEncryptor(StringEncryptor encryptor) {
-        this.encryptor = encryptor;
-    }
-
     @Override
     public String parseProperty(String key, String value, Properties properties) {
         log.trace(format("Parsing property '%s=%s'", key, value));
@@ -98,4 +79,22 @@ public class JasyptPropertiesParser extends DefaultPropertiesParser {
         return value;
     }
 
+    public void setEncryptor(StringEncryptor encryptor) {
+        this.encryptor = encryptor;
+    }
+
+    public void setAlgorithm(String algorithm) {
+        this.algorithm = algorithm;
+    }
+
+    public void setPassword(String password) {
+        // lookup password as either environment or JVM system property
+        if (password.startsWith("sysenv:")) {
+            password = System.getenv(ObjectHelper.after(password, "sysenv:"));
+        }
+        if (password.startsWith("sys:")) {
+            password = System.getProperty(ObjectHelper.after(password, "sys:"));
+        }
+        this.password = password;
+    }
 }