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

This commit is contained in:
cnauroth 2014-09-20 20:53:09 -07:00
parent 84a0a629d3
commit 47491f9a11
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -38,12 +38,14 @@ public abstract class AbstractNNFailoverProxyProvider<T> implements
public abstract boolean useLogicalURI(); 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 * @param fallbackToSimpleAuth - set to true or false during this method to
* indicate if a secure client falls back to simple auth * indicate if a secure client falls back to simple auth
*/ */
public void setFallbackToSimpleAuth(AtomicBoolean fallbackToSimpleAuth) { public synchronized void setFallbackToSimpleAuth(
AtomicBoolean fallbackToSimpleAuth) {
this.fallbackToSimpleAuth = fallbackToSimpleAuth; this.fallbackToSimpleAuth = fallbackToSimpleAuth;
} }
} }