HBASE-15148 Resolve IS2_INCONSISTENT_SYNC findbugs warning in AuthenticationTokenSecretManager (Yu Li)
This commit is contained in:
parent
b1df2f8c88
commit
f9e69b51e1
|
@ -285,6 +285,10 @@ public class AuthenticationTokenSecretManager
|
|||
}
|
||||
}
|
||||
|
||||
synchronized long getLastKeyUpdate() {
|
||||
return lastKeyUpdate;
|
||||
}
|
||||
|
||||
public static SecretKey createSecretKey(byte[] raw) {
|
||||
return SecretManager.createSecretKey(raw);
|
||||
}
|
||||
|
@ -338,10 +342,7 @@ public class AuthenticationTokenSecretManager
|
|||
|
||||
// clear any expired
|
||||
removeExpiredKeys();
|
||||
long localLastKeyUpdate;
|
||||
synchronized (this) {
|
||||
localLastKeyUpdate = lastKeyUpdate;
|
||||
}
|
||||
long localLastKeyUpdate = getLastKeyUpdate();
|
||||
if (localLastKeyUpdate + keyUpdateInterval < now) {
|
||||
// roll a new master key
|
||||
rollCurrentKey();
|
||||
|
|
Loading…
Reference in New Issue