HADOOP-18279. Cancel fileMonitoringTimer even if trustManager isn't defined (#4767)

This commit is contained in:
Steve Vaughan 2022-08-22 15:22:23 -04:00 committed by GitHub
parent 231e095802
commit 17daad34d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -319,8 +319,10 @@ String getPassword(Configuration conf, String alias, String defaultPass) {
*/ */
@Override @Override
public synchronized void destroy() { public synchronized void destroy() {
if (trustManager != null) { if (fileMonitoringTimer != null) {
fileMonitoringTimer.cancel(); fileMonitoringTimer.cancel();
}
if (trustManager != null) {
trustManager = null; trustManager = null;
keyManagers = null; keyManagers = null;
trustManagers = null; trustManagers = null;