HDFS-7107. Avoid Findbugs warning for synchronization on AbstractNNFailoverProxyProvider#fallbackToSimpleAuth. Contributed by Chris Nauroth.

(cherry picked from commit 47491f9a11)
This commit is contained in:
cnauroth 2014-09-20 20:53:09 -07:00
parent 897ced1a20
commit 3ad3f034bb
2 changed files with 7 additions and 2 deletions

View File

@ -566,6 +566,9 @@ Release 2.6.0 - UNRELEASED
HDFS-7105. Allow falling back to a non-SASL connection on
DataTransferProtocol in several edge cases. (cnauroth)
HDFS-7107. Avoid Findbugs warning for synchronization on
AbstractNNFailoverProxyProvider#fallbackToSimpleAuth. (cnauroth)
Release 2.5.1 - 2014-09-05
INCOMPATIBLE CHANGES

View File

@ -38,12 +38,14 @@ public abstract class AbstractNNFailoverProxyProvider<T> implements
public abstract boolean useLogicalURI();
/**
* Set for tracking if a secure client falls back to simple auth.
* Set for tracking if a secure client falls back to simple auth. This method
* is synchronized only to stifle a Findbugs warning.
*
* @param fallbackToSimpleAuth - set to true or false during this method to
* indicate if a secure client falls back to simple auth
*/
public void setFallbackToSimpleAuth(AtomicBoolean fallbackToSimpleAuth) {
public synchronized void setFallbackToSimpleAuth(
AtomicBoolean fallbackToSimpleAuth) {
this.fallbackToSimpleAuth = fallbackToSimpleAuth;
}
}