Annotate guarded methods to silence IDE warnings
@@ -51,18 +51,20 @@ public class CachingKerberosHadoopAuthentication
}
}
+ @GuardedBy("lock")
private void refreshUgi()
{
userGroupInformation = delegate.getUserGroupInformation();
nextRefreshTime = calculateNextRefreshTime(userGroupInformation);
}
+ @GuardedBy("lock")
private boolean refreshIsNeeded()
{
return nextRefreshTime < System.currentTimeMillis() || userGroupInformation == null;
}
- private long calculateNextRefreshTime(UserGroupInformation userGroupInformation)
+ private static long calculateNextRefreshTime(UserGroupInformation userGroupInformation)
{
Subject subject = getSubject(userGroupInformation);
checkArgument(subject != null, "subject must be present in kerberos based UGI");
