This is an automated email from the ASF dual-hosted git repository.
sunchao pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new 17daad34d41 HADOOP-18279. Cancel fileMonitoringTimer even if
trustManager isn't defined (#4767)
17daad34d41 is described below
commit 17daad34d41272e41edff8eee9ec345c95e52690
Author: Steve Vaughan <[email protected]>
AuthorDate: Mon Aug 22 15:22:23 2022 -0400
HADOOP-18279. Cancel fileMonitoringTimer even if trustManager isn't defined
(#4767)
---
.../org/apache/hadoop/security/ssl/FileBasedKeyStoresFactory.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/FileBasedKeyStoresFactory.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/FileBasedKeyStoresFactory.java
index 520047b3a04..4fbb3c8aea6 100644
---
a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/FileBasedKeyStoresFactory.java
+++
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/FileBasedKeyStoresFactory.java
@@ -319,8 +319,10 @@ public class FileBasedKeyStoresFactory implements
KeyStoresFactory {
*/
@Override
public synchronized void destroy() {
- if (trustManager != null) {
+ if (fileMonitoringTimer != null) {
fileMonitoringTimer.cancel();
+ }
+ if (trustManager != null) {
trustManager = null;
keyManagers = null;
trustManagers = null;
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]