diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/ReloadingX509TrustManager.java b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/ReloadingX509TrustManager.java index bb90a61f945..597f8d77df6 100644 --- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/ReloadingX509TrustManager.java +++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/security/ssl/ReloadingX509TrustManager.java @@ -165,10 +165,10 @@ public final class ReloadingX509TrustManager throws IOException, GeneralSecurityException { X509TrustManager trustManager = null; KeyStore ks = KeyStore.getInstance(type); - lastLoaded = file.lastModified(); FileInputStream in = new FileInputStream(file); try { ks.load(in, password.toCharArray()); + lastLoaded = file.lastModified(); LOG.debug("Loaded truststore '" + file + "'"); } finally { in.close();