mirror of https://github.com/apache/jclouds.git
Miscellaneous FindBugs fixes
This commit is contained in:
parent
5399cb6877
commit
195998b3b6
|
@ -66,8 +66,9 @@ public class UpdateRecordsToJSON implements Binder {
|
|||
static List<UpdateRecord> toUpdateRecordList(Map<String, Record> idsToRecords) {
|
||||
List<UpdateRecord> updateRecords = Lists.newArrayList();
|
||||
|
||||
for (String recordId : idsToRecords.keySet()) {
|
||||
Record record = idsToRecords.get(recordId);
|
||||
for (Map.Entry<String, Record> entry : idsToRecords.entrySet()) {
|
||||
String recordId = entry.getKey();
|
||||
Record record = entry.getValue();
|
||||
|
||||
UpdateRecord updateRecord = new UpdateRecord();
|
||||
updateRecord.id = recordId;
|
||||
|
|
|
@ -121,7 +121,7 @@ public class S3RestClientModule<S extends S3Client, A extends S3AsyncClient> ext
|
|||
try {
|
||||
return Optional.fromNullable(client.getBucketLocation(bucket));
|
||||
} catch (ContainerNotFoundException e) {
|
||||
return null;
|
||||
return Optional.absent();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public class BaseVirtualSystemHandler<T extends BaseVirtualSystem<T>, B extends
|
|||
@Inject(optional = true)
|
||||
protected void setExtensionHandlers(
|
||||
@Named("VirtualSystem") Map<String, Provider<? extends SectionHandler>> extensionHandlers) {
|
||||
extensionHandlers = ImmutableMap.<String, Provider<? extends SectionHandler>> builder().putAll(
|
||||
this.extensionHandlers = ImmutableMap.<String, Provider<? extends SectionHandler>> builder().putAll(
|
||||
this.extensionHandlers).putAll(extensionHandlers).build();
|
||||
}
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ import com.google.common.collect.ImmutableMap.Builder;
|
|||
import com.google.common.hash.HashCode;
|
||||
import com.google.common.hash.Hashing;
|
||||
import com.google.common.io.ByteSource;
|
||||
import com.google.common.io.ByteStreams;
|
||||
|
||||
/**
|
||||
* Utilities for ssh key pairs
|
||||
|
@ -115,7 +116,7 @@ public class SshKeys {
|
|||
int byte4 = in.read();
|
||||
int length = (byte1 << 24) + (byte2 << 16) + (byte3 << 8) + (byte4 << 0);
|
||||
byte[] val = new byte[length];
|
||||
in.read(val, 0, length);
|
||||
ByteStreams.readFully(in, val);
|
||||
return val;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue