mirror of https://github.com/apache/jclouds.git
Address FindBugs complaints
This commit is contained in:
parent
dbe983b4f9
commit
ec4cdfda05
|
@ -115,7 +115,7 @@ public class BlobBuilderImpl implements BlobBuilder {
|
|||
return blob;
|
||||
}
|
||||
|
||||
public class PayloadBlobBuilderImpl implements PayloadBlobBuilder {
|
||||
public static class PayloadBlobBuilderImpl implements PayloadBlobBuilder {
|
||||
private final BlobBuilder builder;
|
||||
private final Payload payload;
|
||||
|
||||
|
|
|
@ -18,6 +18,10 @@
|
|||
*/
|
||||
package org.jclouds.blobstore.reference;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
|
||||
/**
|
||||
* Configuration properties and constants used in BlobStore connections.
|
||||
*
|
||||
|
@ -38,8 +42,8 @@ public interface BlobStoreConstants {
|
|||
*/
|
||||
public static final String DIRECTORY_SUFFIX_ROOT = "/";
|
||||
public static final String DIRECTORY_SUFFIX_FOLDER = "_$folder$";
|
||||
public static final String[] DIRECTORY_SUFFIXES = { DIRECTORY_SUFFIX_FOLDER,
|
||||
DIRECTORY_SUFFIX_ROOT };
|
||||
public static final Collection<String> DIRECTORY_SUFFIXES =
|
||||
ImmutableList.of(DIRECTORY_SUFFIX_FOLDER, DIRECTORY_SUFFIX_ROOT);
|
||||
|
||||
/**
|
||||
* Key-value implementations of BlobStore, such as S3, do not have directories. We use an empty
|
||||
|
|
|
@ -79,7 +79,7 @@ import com.google.inject.Inject;
|
|||
@Singleton
|
||||
public class BackoffLimitedRetryHandler implements HttpRetryHandler, IOExceptionRetryHandler {
|
||||
|
||||
public static BackoffLimitedRetryHandler INSTANCE = new BackoffLimitedRetryHandler();
|
||||
public static final BackoffLimitedRetryHandler INSTANCE = new BackoffLimitedRetryHandler();
|
||||
|
||||
@Inject(optional = true)
|
||||
@Named(Constants.PROPERTY_MAX_RETRIES)
|
||||
|
|
|
@ -56,8 +56,8 @@ public class SupplyKeyMatchingValueOrNull<K, V> implements Supplier<K> {
|
|||
Map<K, V> map = Maps.transformValues(supplier.get(), Suppliers.<V> supplierFunction());
|
||||
K region = ImmutableBiMap.copyOf(map).inverse().get(uri);
|
||||
if (region == null && map.size() > 0) {
|
||||
logger.warn("failed to find key for value %s in %s; choosing first: %s", uri, map, region);
|
||||
region = Iterables.get(map.keySet(), 0);
|
||||
logger.warn("failed to find key for value %s in %s; choosing first: %s", uri, map, region);
|
||||
}
|
||||
return region;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue