Merge pull request #939 from andrewgaul/checkstyle-empty-statement

Enforce no empty statements via Checkstyle
This commit is contained in:
Adrian Cole 2012-11-01 19:49:34 -07:00
commit d4c01e6c2e
9 changed files with 12 additions and 12 deletions

View File

@ -58,7 +58,6 @@ public class UnwrapLoadBalancers implements Function<HttpResponse, Set<LoadBalan
Map<String, Set<LB>> map = json.apply(arg0); Map<String, Set<LB>> map = json.apply(arg0);
if (map.size() == 0) if (map.size() == 0)
return ImmutableSet.<LoadBalancer> of(); return ImmutableSet.<LoadBalancer> of();
;
return ImmutableSet.copyOf(Iterables.transform(Iterables.get(map.values(), 0), convertLB)); return ImmutableSet.copyOf(Iterables.transform(Iterables.get(map.values(), 0), convertLB));
} }

View File

@ -54,9 +54,9 @@ public class BatchResponseHandler<V> extends ParseSax.HandlerForGeneratedRequest
protected BatchResponseHandler(String resultElement, HandlerForGeneratedRequestWithResult<Map.Entry<String, V>> resultHandler, protected BatchResponseHandler(String resultElement, HandlerForGeneratedRequestWithResult<Map.Entry<String, V>> resultHandler,
BatchErrorHandler errorHandler) { BatchErrorHandler errorHandler) {
this.resultElement = checkNotNull(resultElement, "resultElement");; this.resultElement = checkNotNull(resultElement, "resultElement");
this.resultHandler = checkNotNull(resultHandler, "resultHandler");; this.resultHandler = checkNotNull(resultHandler, "resultHandler");
this.errorHandler = checkNotNull(errorHandler, "errorHandler");; this.errorHandler = checkNotNull(errorHandler, "errorHandler");
} }
@Override @Override

View File

@ -72,8 +72,8 @@ public class ParseFirstJsonValueNamed<T> implements Function<HttpResponse, T> {
AtomicReference<String> name = new AtomicReference<String>(); AtomicReference<String> name = new AtomicReference<String>();
JsonToken token = reader.peek(); JsonToken token = reader.peek();
for (; token != JsonToken.END_DOCUMENT && nnn(this.name, reader, token, name); token = skipAndPeek(token, for (; token != JsonToken.END_DOCUMENT && nnn(this.name, reader, token, name); token = skipAndPeek(token,
reader)) reader)) {
; }
if (name.get() == null) { if (name.get() == null) {
logger.trace("did not object named %s in json from response %s", this.name, arg0); logger.trace("did not object named %s in json from response %s", this.name, arg0);
return nothing(); return nothing();

View File

@ -107,7 +107,7 @@ public class Operation {
* @see Operation#getHttpStatusCode() * @see Operation#getHttpStatusCode()
*/ */
public Builder httpStatusCode(Integer httpStatusCode) { public Builder httpStatusCode(Integer httpStatusCode) {
this.httpStatusCode = Optional.fromNullable(httpStatusCode);; this.httpStatusCode = Optional.fromNullable(httpStatusCode);
return this; return this;
} }
@ -139,7 +139,7 @@ public class Operation {
this.id = checkNotNull(id, "id"); this.id = checkNotNull(id, "id");
this.rawStatus = checkNotNull(rawStatus, "rawStatus for %s", id); this.rawStatus = checkNotNull(rawStatus, "rawStatus for %s", id);
this.status = checkNotNull(status, "status for %s", id); this.status = checkNotNull(status, "status for %s", id);
this.httpStatusCode = checkNotNull(httpStatusCode, "httpStatusCode for %s", id);; this.httpStatusCode = checkNotNull(httpStatusCode, "httpStatusCode for %s", id);
this.error = checkNotNull(error, "error for %s", id); this.error = checkNotNull(error, "error for %s", id);
} }

View File

@ -124,7 +124,7 @@ public class Vdc extends Entity {
* @see Vdc#getAvailableNetworks() * @see Vdc#getAvailableNetworks()
*/ */
public B network(Reference availableNetwork) { public B network(Reference availableNetwork) {
this.availableNetworks.add(checkNotNull(availableNetwork, "availableNetwork"));; this.availableNetworks.add(checkNotNull(availableNetwork, "availableNetwork"));
return self(); return self();
} }

View File

@ -127,7 +127,7 @@ public class RasdItem extends ResourceAllocationSettingData {
super(builder); super(builder);
this.type = builder.type; this.type = builder.type;
this.href = builder.href; this.href = builder.href;
this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;; this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;
} }
protected RasdItem() { protected RasdItem() {

View File

@ -142,7 +142,7 @@ public class OperatingSystemSection extends org.jclouds.dmtf.ovf.OperatingSystem
this.osType = builder.osType; this.osType = builder.osType;
this.href = builder.href; this.href = builder.href;
this.type = builder.type; this.type = builder.type;
this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;; this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;
} }
protected OperatingSystemSection() { protected OperatingSystemSection() {

View File

@ -132,7 +132,7 @@ public class VirtualHardwareSection extends org.jclouds.dmtf.ovf.VirtualHardware
super(builder); super(builder);
this.type = builder.type; this.type = builder.type;
this.href = builder.href; this.href = builder.href;
this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;; this.links = builder.links != null && builder.links.isEmpty() ? null : builder.links;
} }
protected VirtualHardwareSection() { protected VirtualHardwareSection() {

View File

@ -5,6 +5,7 @@
<property name="severity" value="warning"/> <property name="severity" value="warning"/>
<module name="NewlineAtEndOfFile"/> <module name="NewlineAtEndOfFile"/>
<module name="TreeWalker"> <module name="TreeWalker">
<module name="EmptyStatement"/>
<module name="LineLength"> <module name="LineLength">
<property name="ignorePattern" value="^import\s.*;$"/> <property name="ignorePattern" value="^import\s.*;$"/>
<property name="max" value="120"/> <property name="max" value="120"/>