You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2017/08/26 20:53:23 UTC
[05/50] logging-log4j2 git commit: Clean ups.
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/LOG4J2-1431
Commit: b004f81ee954f6108f9f2fbb541cc481be87f5d0
Parents: 889232e
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Aug 17 16:33:30 2017 -0600
Committer: Gary Gregory <ga...@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;
+ }
}
/**