Repository: logging-log4j2
Updated Branches:
  refs/heads/master 889232e28 -> b004f81ee


Clean ups.

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

Branch: refs/heads/master
Commit: b004f81ee954f6108f9f2fbb541cc481be87f5d0
Parents: 889232e
Author: Gary Gregory <garydgreg...@gmail.com>
Authored: Thu Aug 17 16:33:30 2017 -0600
Committer: Gary Gregory <garydgreg...@gmail.com>
Committed: Thu Aug 17 16:33:30 2017 -0600

----------------------------------------------------------------------
 .../logging/log4j/core/net/ssl/StoreConfiguration.java       | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b004f81e/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
----------------------------------------------------------------------
diff --git 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
index 044e060..47dea1d 100644
--- 
a/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
+++ 
b/log4j-core/src/main/java/org/apache/logging/log4j/core/net/ssl/StoreConfiguration.java
@@ -31,7 +31,7 @@ public class StoreConfiguration<T> {
 
     public StoreConfiguration(final String location, final char[] password) {
         this.location = location;
-        this.password = password == null ? null : password;
+        this.password = password;
     }
 
     /**
@@ -39,8 +39,10 @@ public class StoreConfiguration<T> {
      */
     public void clearSecrets() {
         this.location = null;
-        Arrays.fill(password, Character.MIN_VALUE);
-        this.password = null;
+        if (password != null) {
+            Arrays.fill(password, Character.MIN_VALUE);
+            this.password = null;
+        }
     }
 
     /**

Reply via email to