Address all existing Checkstyle violations

This commit is contained in:
Andrew Gaul 2012-11-10 13:37:42 -08:00
parent 547bfcd8bc
commit 4af8008b51
14 changed files with 26 additions and 21 deletions

View File

@ -35,6 +35,7 @@ import org.testng.annotations.Test;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
import com.google.common.collect.Maps;
/** /**
* Tests for the function for transforming a nova specific Image into a generic * Tests for the function for transforming a nova specific Image into a generic
@ -79,7 +80,7 @@ public class ImageToOperatingSystemTest {
Image imageToConvert = Image.builder().id("id-" + name).name(name).build(); Image imageToConvert = Image.builder().id("id-" + name).name(name).build();
Map<OsFamily, Map<String, String>> osFamilyMap = new HashMap<OsFamily, Map<String, String>>(); Map<OsFamily, Map<String, String>> osFamilyMap = Maps.newHashMap();
osFamilyMap.put(OsFamily.WINDOWS, ImmutableMap.of("Server 2008 R2", "Server-2008-R2")); osFamilyMap.put(OsFamily.WINDOWS, ImmutableMap.of("Server 2008 R2", "Server-2008-R2"));
ImageToOperatingSystem converter = new ImageToOperatingSystem(osFamilyMap); ImageToOperatingSystem converter = new ImageToOperatingSystem(osFamilyMap);
@ -100,7 +101,7 @@ public class ImageToOperatingSystemTest {
Image imageToConvert = Image.builder().id("id-" + name).name(name).build(); Image imageToConvert = Image.builder().id("id-" + name).name(name).build();
Map<OsFamily, Map<String, String>> osFamilyMap = new HashMap<OsFamily, Map<String, String>>(); Map<OsFamily, Map<String, String>> osFamilyMap = Maps.newHashMap();
osFamilyMap.put(OsFamily.WINDOWS, ImmutableMap.of("98", "98")); osFamilyMap.put(OsFamily.WINDOWS, ImmutableMap.of("98", "98"));
ImageToOperatingSystem converter = new ImageToOperatingSystem(osFamilyMap); ImageToOperatingSystem converter = new ImageToOperatingSystem(osFamilyMap);

View File

@ -20,7 +20,6 @@ package org.jclouds.dmtf.cim;
import static org.jclouds.dmtf.DMTFConstants.CIM_NS; import static org.jclouds.dmtf.DMTFConstants.CIM_NS;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyAttribute;
@ -30,6 +29,8 @@ import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import com.google.common.collect.Maps;
/** /**
* <p>Java class for cimAnySimpleType complex type. * <p>Java class for cimAnySimpleType complex type.
* *
@ -45,7 +46,7 @@ public class CimAnySimpleType {
@XmlSchemaType(name = "anySimpleType") @XmlSchemaType(name = "anySimpleType")
protected String value; protected String value;
@XmlAnyAttribute @XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>(); private Map<QName, String> otherAttributes = Maps.newHashMap();
/** /**
* Gets the value of the value property. * Gets the value of the value property.

View File

@ -20,7 +20,6 @@ package org.jclouds.dmtf.cim;
import static org.jclouds.dmtf.DMTFConstants.CIM_NS; import static org.jclouds.dmtf.DMTFConstants.CIM_NS;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyAttribute;
@ -28,6 +27,8 @@ import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import com.google.common.collect.Maps;
/** /**
* Java class for cimBoolean complex type. * Java class for cimBoolean complex type.
* *
@ -41,7 +42,7 @@ public class CimBoolean {
@XmlValue @XmlValue
protected boolean value; protected boolean value;
@XmlAnyAttribute @XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>(); private Map<QName, String> otherAttributes = Maps.newHashMap();
/** /**
* Gets the value of the value property. * Gets the value of the value property.

View File

@ -20,7 +20,6 @@ package org.jclouds.dmtf.cim;
import static com.google.common.base.Objects.equal; import static com.google.common.base.Objects.equal;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyAttribute;
@ -29,6 +28,7 @@ import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import com.google.common.base.Objects; import com.google.common.base.Objects;
import com.google.common.collect.Maps;
/** /**
* Java class for cimString complex type. * Java class for cimString complex type.
@ -51,7 +51,7 @@ public class CimString {
@XmlValue @XmlValue
protected String value; protected String value;
@XmlAnyAttribute @XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>(); private Map<QName, String> otherAttributes = Maps.newHashMap();
/** /**
* Gets the value of the value property. * Gets the value of the value property.

View File

@ -18,7 +18,6 @@
*/ */
package org.jclouds.dmtf.cim; package org.jclouds.dmtf.cim;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyAttribute;
@ -27,6 +26,8 @@ import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import com.google.common.collect.Maps;
/** /**
* Java class for cimUnsignedInt complex type. * Java class for cimUnsignedInt complex type.
* *
@ -41,7 +42,7 @@ public class CimUnsignedInt {
@XmlSchemaType(name = "unsignedInt") @XmlSchemaType(name = "unsignedInt")
protected long value; protected long value;
@XmlAnyAttribute @XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>(); private Map<QName, String> otherAttributes = Maps.newHashMap();
/** /**
* Gets the value of the value property. * Gets the value of the value property.

View File

@ -19,7 +19,6 @@
package org.jclouds.dmtf.cim; package org.jclouds.dmtf.cim;
import java.math.BigInteger; import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyAttribute;
@ -28,6 +27,8 @@ import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import com.google.common.collect.Maps;
/** /**
* Java class for cimUnsignedLong complex type. * Java class for cimUnsignedLong complex type.
* *
@ -42,7 +43,7 @@ public class CimUnsignedLong {
@XmlSchemaType(name = "unsignedLong") @XmlSchemaType(name = "unsignedLong")
protected BigInteger value; protected BigInteger value;
@XmlAnyAttribute @XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>(); private Map<QName, String> otherAttributes = Maps.newHashMap();
/** /**
* Gets the value of the value property. * Gets the value of the value property.

View File

@ -8,7 +8,6 @@
package org.jclouds.dmtf.cim; package org.jclouds.dmtf.cim;
import java.util.HashMap;
import java.util.Map; import java.util.Map;
import javax.xml.bind.annotation.XmlAnyAttribute; import javax.xml.bind.annotation.XmlAnyAttribute;
@ -17,6 +16,8 @@ import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue; import javax.xml.bind.annotation.XmlValue;
import javax.xml.namespace.QName; import javax.xml.namespace.QName;
import com.google.common.collect.Maps;
/** /**
* <p>Java class for cimUnsignedShort complex type. * <p>Java class for cimUnsignedShort complex type.
* *
@ -39,7 +40,7 @@ public class CimUnsignedShort {
@XmlSchemaType(name = "unsignedShort") @XmlSchemaType(name = "unsignedShort")
protected int value; protected int value;
@XmlAnyAttribute @XmlAnyAttribute
private Map<QName, String> otherAttributes = new HashMap<QName, String>(); private Map<QName, String> otherAttributes = Maps.newHashMap();
/** /**
* Gets the value of the value property. * Gets the value of the value property.

View File

@ -45,7 +45,7 @@ public class Snapshot {
return new ConcreteBuilder().fromSnapshot(this); return new ConcreteBuilder().fromSnapshot(this);
} }
public static abstract class Builder<T extends Builder<T>> { public abstract static class Builder<T extends Builder<T>> {
protected abstract T self(); protected abstract T self();
protected String id; protected String id;

View File

@ -72,7 +72,7 @@ public class Volume {
return new ConcreteBuilder().fromVolume(this); return new ConcreteBuilder().fromVolume(this);
} }
public static abstract class Builder<T extends Builder<T>> { public abstract static class Builder<T extends Builder<T>> {
protected abstract T self(); protected abstract T self();
protected String id; protected String id;

View File

@ -48,7 +48,7 @@ public class VolumeType {
return new ConcreteBuilder().fromVolumeType(this); return new ConcreteBuilder().fromVolumeType(this);
} }
public static abstract class Builder<T extends Builder<T>> { public abstract static class Builder<T extends Builder<T>> {
protected abstract T self(); protected abstract T self();
protected String id; protected String id;

View File

@ -29,7 +29,6 @@ import java.util.Map.Entry;
import javax.inject.Inject; import javax.inject.Inject;
import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpRequest;
import org.jclouds.openstack.cinder.v1.features.VolumeTypeApi;
import org.jclouds.rest.MapBinder; import org.jclouds.rest.MapBinder;
import org.jclouds.rest.binders.BindToJsonPayload; import org.jclouds.rest.binders.BindToJsonPayload;