From 9d643b569a8f2a20ca5cfd56340cd790e82f0a1b Mon Sep 17 00:00:00 2001 From: Andrew Gaul Date: Thu, 1 Nov 2012 20:11:23 -0700 Subject: [PATCH] Enforce a single variable declaration per line --- .../compute/functions/VirtualMachineToNodeMetadata.java | 3 ++- core/src/main/java/org/jclouds/crypto/Sha512Crypt.java | 3 ++- .../org/jclouds/abiquo/domain/infrastructure/Machine.java | 4 +++- .../org/jclouds/virtualbox/functions/IMachineToIpAddress.java | 3 ++- .../java/org/jclouds/virtualbox/functions/NodeCreator.java | 3 ++- resources/checkstyle.xml | 1 + 6 files changed, 12 insertions(+), 5 deletions(-) diff --git a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java index 904c83fbdd..c0aaadf428 100644 --- a/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java +++ b/apis/cloudstack/src/main/java/org/jclouds/cloudstack/compute/functions/VirtualMachineToNodeMetadata.java @@ -124,7 +124,8 @@ public class VirtualMachineToNodeMetadata implements Function publicAddresses = newHashSet(), privateAddresses = newHashSet(); + Set publicAddresses = newHashSet(); + Set privateAddresses = newHashSet(); if (from.getIPAddress() != null) { boolean isPrivate = isPrivateIPAddress(from.getIPAddress()); if (isPrivate) { diff --git a/core/src/main/java/org/jclouds/crypto/Sha512Crypt.java b/core/src/main/java/org/jclouds/crypto/Sha512Crypt.java index 0784693ffd..3a0059e3b7 100644 --- a/core/src/main/java/org/jclouds/crypto/Sha512Crypt.java +++ b/core/src/main/java/org/jclouds/crypto/Sha512Crypt.java @@ -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; diff --git a/labs/abiquo/src/main/java/org/jclouds/abiquo/domain/infrastructure/Machine.java b/labs/abiquo/src/main/java/org/jclouds/abiquo/domain/infrastructure/Machine.java index 233a14fbb3..b556e2c892 100644 --- a/labs/abiquo/src/main/java/org/jclouds/abiquo/domain/infrastructure/Machine.java +++ b/labs/abiquo/src/main/java/org/jclouds/abiquo/domain/infrastructure/Machine.java @@ -286,7 +286,9 @@ public class Machine extends AbstractPhysicalMachine { public static class Builder { private RestContext context; - private String name, description; + private String name; + + private String description; private Integer virtualRamInMb; diff --git a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/IMachineToIpAddress.java b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/IMachineToIpAddress.java index f7a97e5d03..9acd185552 100644 --- a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/IMachineToIpAddress.java +++ b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/IMachineToIpAddress.java @@ -50,7 +50,8 @@ public class IMachineToIpAddress implements Function { 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++; diff --git a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/NodeCreator.java b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/NodeCreator.java index 748bee31fe..cc4de802ac 100644 --- a/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/NodeCreator.java +++ b/labs/virtualbox/src/main/java/org/jclouds/virtualbox/functions/NodeCreator.java @@ -182,7 +182,8 @@ public class NodeCreator implements Function +