mirror of https://github.com/apache/jclouds.git
Avoid injecting on final fields
This can cause thread visibility issues. Found via error-prone.
This commit is contained in:
parent
e08acc6ed6
commit
df43b36487
|
@ -51,7 +51,7 @@ public class RetryOnRenew implements HttpRetryHandler {
|
|||
@VisibleForTesting
|
||||
@Inject(optional = true)
|
||||
@Named(Constants.PROPERTY_MAX_RETRIES)
|
||||
static final int NUM_RETRIES = 5;
|
||||
static int NUM_RETRIES = 5;
|
||||
|
||||
private final LoadingCache<Credentials, Access> authenticationResponseCache;
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ public final class ComputeServiceConstants {
|
|||
@Singleton
|
||||
public static class NamingConvention {
|
||||
@Inject(optional = true)
|
||||
public final Supplier<String> randomSuffix = new Supplier<String>() {
|
||||
public Supplier<String> randomSuffix = new Supplier<String>() {
|
||||
final SecureRandom random = new SecureRandom();
|
||||
|
||||
@Override
|
||||
|
|
|
@ -808,7 +808,7 @@
|
|||
<compilerArg>-Xep:AssertFalse:ERROR</compilerArg>
|
||||
<compilerArg>-Xep:AssistedInjectAndInjectOnConstructors:ERROR</compilerArg>
|
||||
<compilerArg>-Xep:CollectionIncompatibleType:ERROR</compilerArg>
|
||||
<compilerArg>-Xep:GuiceInjectOnFinalField:OFF</compilerArg> <!-- noisy -->
|
||||
<compilerArg>-Xep:GuiceInjectOnFinalField:ERROR</compilerArg>
|
||||
<compilerArg>-Xep:MissingFail:ERROR</compilerArg>
|
||||
<compilerArg>-Xep:NullablePrimitive:ERROR</compilerArg>
|
||||
<compilerArg>-Xep:OverridesGuiceInjectableMethod:OFF</compilerArg> <!-- internal error with 2.0.5 -->
|
||||
|
|
Loading…
Reference in New Issue