Merge pull request #959 from andrewgaul/checkstyle-multiple-variable-declarations

Enforce a single variable declaration per line
This commit is contained in:
Adrian Cole 2012-11-05 11:36:32 -08:00
commit 760824800e
6 changed files with 12 additions and 5 deletions

View File

@ -124,7 +124,8 @@ public class VirtualMachineToNodeMetadata implements Function<VirtualMachine, No
builder.status(vmStateToNodeStatus.get(from.getState()));
Set<String> publicAddresses = newHashSet(), privateAddresses = newHashSet();
Set<String> publicAddresses = newHashSet();
Set<String> privateAddresses = newHashSet();
if (from.getIPAddress() != null) {
boolean isPrivate = isPrivateIPAddress(from.getIPAddress());
if (isPrivate) {

View File

@ -158,7 +158,8 @@ public class Sha512Crypt {
byte[] temp_result;
byte[] p_bytes = null;
byte[] s_bytes = null;
int cnt, cnt2;
int cnt;
int cnt2;
int rounds = ROUNDS_DEFAULT; // Default number of rounds.
StringBuilder buffer;

View File

@ -286,7 +286,9 @@ public class Machine extends AbstractPhysicalMachine {
public static class Builder {
private RestContext<AbiquoApi, AbiquoAsyncApi> context;
private String name, description;
private String name;
private String description;
private Integer virtualRamInMb;

View File

@ -50,7 +50,8 @@ public class IMachineToIpAddress implements Function<IMachine, String> {
public String apply(IMachine machine) {
String macAddress = machine.getNetworkAdapter(0l).getMACAddress();
int offset = 0, step = 2;
int offset = 0;
int step = 2;
for (int j = 1; j <= 5; j++) {
macAddress = new StringBuilder(macAddress).insert(j * step + offset, ":").toString().toLowerCase();
offset++;

View File

@ -182,7 +182,8 @@ public class NodeCreator implements Function<NodeSpec, NodeAndInitialCredentials
}
private long findSlotForNetworkAttachment(IMachine clone, NetworkAttachmentType networkAttachmentType) {
long slot = -1, i = 0;
long slot = -1;
long i = 0;
while (slot == -1 && i < 4) {
if(clone.getNetworkAdapter(i).getAttachmentType().equals(networkAttachmentType))
slot = i;

View File

@ -12,6 +12,7 @@
<property name="max" value="120"/>
</module>
<module name="ModifierOrder"/>
<module name="MultipleVariableDeclarations"/>
<module name="UnusedImports"/>
</module>
</module>