mirror of https://github.com/apache/jclouds.git
Address Checkstyle violations
This commit requires temporarily disabling some checks.
This commit is contained in:
parent
ae3cafdeef
commit
fff2fa6e05
|
@ -225,8 +225,8 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
|
|||
ListenableFuture<BoundedSet<? extends DirectoryEntry>> returnVal = async.listDirectory(container, nativeOptions);
|
||||
ListenableFuture<PageSet<? extends StorageMetadata>> list = transform(returnVal, container2ResourceList,
|
||||
userExecutor);
|
||||
return (options.isDetailed() ? transform(list,
|
||||
fetchBlobMetadataProvider.get().setContainerName(container)) : list);
|
||||
return options.isDetailed() ? transform(list,
|
||||
fetchBlobMetadataProvider.get().setContainerName(container)) : list;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -48,6 +48,7 @@ import org.jclouds.logging.Logger;
|
|||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.util.concurrent.Atomics;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.google.common.util.concurrent.UncheckedTimeoutException;
|
||||
|
@ -97,7 +98,7 @@ public class CloudServersImageExtension implements ImageExtension {
|
|||
org.jclouds.cloudservers.domain.Image csImage = client.createImageFromServer(cloneTemplate.getName(),
|
||||
Integer.parseInt(cloneTemplate.getSourceNodeId()));
|
||||
|
||||
final AtomicReference<Image> image = new AtomicReference<Image>(new ImageBuilder()
|
||||
final AtomicReference<Image> image = Atomics.newReference(new ImageBuilder()
|
||||
.location(location.get())
|
||||
.ids(csImage.getId() + "")
|
||||
.description(cloneTemplate.getName())
|
||||
|
|
|
@ -38,7 +38,7 @@ public final class EncryptedPasswordAndPrivateKey {
|
|||
return builder().fromEncryptedPasswordAndPrivateKey(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
|
||||
protected String encryptedPassword;
|
||||
protected String privateKey;
|
||||
|
|
|
@ -93,7 +93,7 @@ public class EC2ApiMetadata extends BaseRestApiMetadata {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Builder() {
|
||||
this(EC2Client.class, EC2AsyncClient.class);
|
||||
|
|
|
@ -55,6 +55,7 @@ import org.jclouds.logging.Logger;
|
|||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.util.concurrent.Atomics;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.google.common.util.concurrent.UncheckedTimeoutException;
|
||||
|
@ -110,7 +111,7 @@ public class EC2ImageExtension implements ImageExtension {
|
|||
String imageId = ec2Client.getAMIServices().createImageInRegion(region, cloneTemplate.getName(), instanceId,
|
||||
CreateImageOptions.NONE);
|
||||
|
||||
final AtomicReference<Image> image = new AtomicReference<Image>(new ImageBuilder()
|
||||
final AtomicReference<Image> image = Atomics.newReference(new ImageBuilder()
|
||||
.location(find(locations.get(), idEquals(region)))
|
||||
.id(region + "/" + imageId)
|
||||
.providerId(imageId)
|
||||
|
|
|
@ -161,7 +161,7 @@ public final class Subnet {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String subnetId;
|
||||
private State subnetState;
|
||||
private String vpcId;
|
||||
|
|
|
@ -73,7 +73,7 @@ public class KeystoneApiMetadata extends BaseRestApiMetadata {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Builder() {
|
||||
this(KeystoneApi.class, KeystoneAsyncApi.class);
|
||||
|
|
|
@ -53,6 +53,7 @@ import org.jclouds.openstack.nova.v2_0.domain.zonescoped.ZoneAndId;
|
|||
|
||||
import com.google.common.base.Predicate;
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.util.concurrent.Atomics;
|
||||
import com.google.common.util.concurrent.ListenableFuture;
|
||||
import com.google.common.util.concurrent.ListeningExecutorService;
|
||||
import com.google.common.util.concurrent.UncheckedTimeoutException;
|
||||
|
@ -109,7 +110,7 @@ public class NovaImageExtension implements ImageExtension {
|
|||
|
||||
logger.info(">> Registered new Image %s, waiting for it to become available.", newImageId);
|
||||
|
||||
final AtomicReference<Image> image = new AtomicReference<Image>(new ImageBuilder()
|
||||
final AtomicReference<Image> image = Atomics.newReference(new ImageBuilder()
|
||||
.location(find(locations.get(), idEquals(targetImageZoneAndId.getZone())))
|
||||
.id(targetImageZoneAndId.slashEncode())
|
||||
.providerId(targetImageZoneAndId.getId())
|
||||
|
|
|
@ -47,7 +47,7 @@ public class ServerCreated extends Resource {
|
|||
return builder().fromServerCreated(this);
|
||||
}
|
||||
|
||||
public final static class Builder extends Resource.Builder<Builder> {
|
||||
public static final class Builder extends Resource.Builder<Builder> {
|
||||
protected String adminPass;
|
||||
|
||||
/**
|
||||
|
|
|
@ -133,7 +133,7 @@ public class ChangeBatch extends ForwardingList<ActionOnResourceRecordSet> {
|
|||
return new Builder();
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private Optional<String> comment = Optional.absent();
|
||||
private ImmutableList.Builder<ActionOnResourceRecordSet> changes = ImmutableList.builder();
|
||||
|
||||
|
|
|
@ -108,7 +108,7 @@ public final class HostedZone {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String id;
|
||||
private String name;
|
||||
private String callerReference;
|
||||
|
|
|
@ -95,7 +95,7 @@ public class ResourceRecordSet {
|
|||
/**
|
||||
* A portion of a RRs who share the same name and type
|
||||
*/
|
||||
public static abstract class RecordSubset extends ResourceRecordSet {
|
||||
public abstract static class RecordSubset extends ResourceRecordSet {
|
||||
public static final class Weighted extends RecordSubset {
|
||||
|
||||
private final int weight;
|
||||
|
@ -261,7 +261,7 @@ public class ResourceRecordSet {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String id;
|
||||
private String name;
|
||||
private String type;
|
||||
|
|
|
@ -94,7 +94,7 @@ public class S3ApiMetadata extends BaseRestApiMetadata {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Builder() {
|
||||
this(S3Client.class, S3AsyncClient.class);
|
||||
|
|
|
@ -109,7 +109,7 @@ public final class SessionCredentials extends Credentials {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder extends Credentials.Builder<SessionCredentials> {
|
||||
public static final class Builder extends Credentials.Builder<SessionCredentials> {
|
||||
private String accessKeyId;
|
||||
private String secretAccessKey;
|
||||
private String sessionToken;
|
||||
|
|
|
@ -26,7 +26,8 @@ import static com.google.common.io.BaseEncoding.base64;
|
|||
import static com.google.common.io.ByteStreams.readBytes;
|
||||
import static org.jclouds.aws.reference.FormParameters.ACTION;
|
||||
import static org.jclouds.aws.reference.FormParameters.AWS_ACCESS_KEY_ID;
|
||||
import static org.jclouds.aws.reference.FormParameters.*;
|
||||
import static org.jclouds.aws.reference.FormParameters.SECURITY_TOKEN;
|
||||
import static org.jclouds.aws.reference.FormParameters.SIGNATURE;
|
||||
import static org.jclouds.aws.reference.FormParameters.SIGNATURE_METHOD;
|
||||
import static org.jclouds.aws.reference.FormParameters.SIGNATURE_VERSION;
|
||||
import static org.jclouds.aws.reference.FormParameters.TIMESTAMP;
|
||||
|
|
|
@ -37,7 +37,7 @@ public final class UserAndSessionCredentials {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private User user;
|
||||
private SessionCredentials credentials;
|
||||
private int packedPolicySize;
|
||||
|
|
|
@ -78,7 +78,7 @@ public class SwiftApiMetadata extends BaseRestApiMetadata {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> extends BaseRestApiMetadata.Builder<T> {
|
||||
@SuppressWarnings("deprecation")
|
||||
protected Builder() {
|
||||
this(SwiftClient.class, SwiftAsyncClient.class);
|
||||
|
|
|
@ -75,7 +75,7 @@ public class SwiftKeystoneApiMetadata extends SwiftApiMetadata {
|
|||
return properties;
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> extends SwiftApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> extends SwiftApiMetadata.Builder<T> {
|
||||
protected Builder() {
|
||||
this(SwiftKeystoneClient.class, SwiftKeystoneAsyncClient.class);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,8 @@ package org.jclouds.compute.domain;
|
|||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import static com.google.common.base.CaseFormat.*;
|
||||
import static com.google.common.base.CaseFormat.LOWER_HYPHEN;
|
||||
import static com.google.common.base.CaseFormat.UPPER_UNDERSCORE;
|
||||
|
||||
/**
|
||||
* Running Operating system
|
||||
|
|
|
@ -77,7 +77,7 @@ public abstract class BaseApiMetadata implements ApiMetadata {
|
|||
return props;
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> implements ApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> implements ApiMetadata.Builder<T> {
|
||||
protected abstract T self();
|
||||
|
||||
private String id;
|
||||
|
|
|
@ -88,7 +88,7 @@ public class IterableWithMarkers {
|
|||
}
|
||||
}
|
||||
|
||||
private static abstract class ForwardingIterableWithMarker<T> extends IterableWithMarker<T> {
|
||||
private abstract static class ForwardingIterableWithMarker<T> extends IterableWithMarker<T> {
|
||||
|
||||
protected abstract IterableWithMarker<T> delegate();
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ public abstract class Arg0ToPagedIterable<T, I extends Arg0ToPagedIterable<T, I>
|
|||
*
|
||||
* @author Adrian Cole
|
||||
*/
|
||||
public static abstract class FromCaller<T, I extends FromCaller<T, I>> extends Arg0ToPagedIterable<T, I> {
|
||||
public abstract static class FromCaller<T, I extends FromCaller<T, I>> extends Arg0ToPagedIterable<T, I> {
|
||||
@Override
|
||||
protected List<Object> getArgs(GeneratedHttpRequest request) {
|
||||
return request.getCaller().get().getArgs();
|
||||
|
|
|
@ -113,7 +113,7 @@ public class WithSubmissionTrace {
|
|||
}
|
||||
}
|
||||
|
||||
private final static Set<String> stackTracesToTrim = ImmutableSet.of(WithSubmissionTrace.class.getName(),
|
||||
private static final Set<String> stackTracesToTrim = ImmutableSet.of(WithSubmissionTrace.class.getName(),
|
||||
ListeningExecutorService.class.getName(), ListenableFuture.class.getName(),
|
||||
ListeningScheduledExecutorService.class.getName(), ScheduledFuture.class.getName());
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
*/
|
||||
package org.jclouds.http;
|
||||
|
||||
import static com.google.common.base.Preconditions.*;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ public class NamingStrategies {
|
|||
/**
|
||||
* Determines field naming from constructor annotations
|
||||
*/
|
||||
public final static class AnnotationConstructorNamingStrategy extends AnnotationBasedNamingStrategy {
|
||||
public static final class AnnotationConstructorNamingStrategy extends AnnotationBasedNamingStrategy {
|
||||
private final Predicate<Invokable<?, ?>> hasMarker;
|
||||
private final Collection<? extends Class<? extends Annotation>> markers;
|
||||
|
||||
|
|
|
@ -306,8 +306,8 @@ public class Reflection2 {
|
|||
return false;
|
||||
}
|
||||
String packageName = clazzPackage.getName();
|
||||
return (packageName.startsWith("com.sun.") || packageName.startsWith("java.")
|
||||
|| packageName.startsWith("javax.") || packageName.startsWith("sun."));
|
||||
return packageName.startsWith("com.sun.") || packageName.startsWith("java.")
|
||||
|| packageName.startsWith("javax.") || packageName.startsWith("sun.");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -61,7 +61,7 @@ public abstract class BaseHttpApiMetadata<A> extends BaseApiMetadata implements
|
|||
}, apiToken);
|
||||
}
|
||||
|
||||
public static abstract class Builder<A, T extends Builder<A, T>> extends BaseApiMetadata.Builder<T> implements
|
||||
public abstract static class Builder<A, T extends Builder<A, T>> extends BaseApiMetadata.Builder<T> implements
|
||||
HttpApiMetadata.Builder<A, T> {
|
||||
protected Class<A> api;
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ public abstract class BaseRestApiMetadata extends BaseApiMetadata implements Res
|
|||
}, asyncApiToken);
|
||||
}
|
||||
|
||||
public static abstract class Builder<T extends Builder<T>> extends BaseApiMetadata.Builder<T> implements RestApiMetadata.Builder<T> {
|
||||
public abstract static class Builder<T extends Builder<T>> extends BaseApiMetadata.Builder<T> implements RestApiMetadata.Builder<T> {
|
||||
protected Class<?> api;
|
||||
protected Class<?> asyncApi;
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ public final class GeneratedHttpRequest extends HttpRequest {
|
|||
return new Builder().fromGeneratedHttpRequest(this);
|
||||
}
|
||||
|
||||
public final static class Builder extends HttpRequest.Builder<Builder> {
|
||||
public static final class Builder extends HttpRequest.Builder<Builder> {
|
||||
private Invocation invocation;
|
||||
private Optional<Invocation> caller = Optional.absent();
|
||||
|
||||
|
|
|
@ -572,8 +572,8 @@ public class RestAnnotationProcessor implements Function<Invocation, HttpRequest
|
|||
}
|
||||
|
||||
private boolean shouldAddHostHeader(Invocation invocation) {
|
||||
return (invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(VirtualHost.class) || invocation
|
||||
.getInvokable().isAnnotationPresent(VirtualHost.class));
|
||||
return invocation.getInvokable().getOwnerType().getRawType().isAnnotationPresent(VirtualHost.class) || invocation
|
||||
.getInvokable().isAnnotationPresent(VirtualHost.class);
|
||||
}
|
||||
|
||||
private GeneratedHttpRequest decorateRequest(GeneratedHttpRequest request) throws NegativeArraySizeException {
|
||||
|
|
|
@ -41,7 +41,7 @@ import com.google.common.reflect.Invokable;
|
|||
@Test(testName = "Arg0ToPagedIterableTest")
|
||||
public class Arg0ToPagedIterableTest {
|
||||
|
||||
private static abstract class TestArg0 extends Arg0ToPagedIterable<String, TestArg0> {
|
||||
private abstract static class TestArg0 extends Arg0ToPagedIterable<String, TestArg0> {
|
||||
private TestArg0(GeneratedHttpRequest in) {
|
||||
this.setContext(in);
|
||||
}
|
||||
|
@ -112,7 +112,7 @@ public class Arg0ToPagedIterableTest {
|
|||
}
|
||||
}
|
||||
|
||||
private static abstract class TestCallerArg0 extends Arg0ToPagedIterable.FromCaller<String, TestCallerArg0> {
|
||||
private abstract static class TestCallerArg0 extends Arg0ToPagedIterable.FromCaller<String, TestCallerArg0> {
|
||||
private TestCallerArg0(GeneratedHttpRequest in) {
|
||||
this.setContext(in);
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ public final class SessionConnection implements Connection<Session> {
|
|||
return new Builder();
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
|
||||
private HostAndPort hostAndPort;
|
||||
private LoginCredentials loginCredentials;
|
||||
|
|
|
@ -118,7 +118,7 @@ public class DynECTHttpApiModule extends HttpApiModule<DynECTApi> {
|
|||
* synchronized to prevent multiple callers from overlapping requests on the same session
|
||||
*/
|
||||
@Override
|
||||
synchronized protected HttpResponse invoke(HttpURLConnection connection) throws IOException, InterruptedException {
|
||||
protected synchronized HttpResponse invoke(HttpURLConnection connection) throws IOException, InterruptedException {
|
||||
HttpResponse response = super.invoke(connection);
|
||||
if (response.getStatusCode() == 200) {
|
||||
byte[] data = closeClientButKeepContentStream(response);
|
||||
|
|
|
@ -106,7 +106,7 @@ public final class CreatePrimaryZone {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String fqdn;
|
||||
private String contact;
|
||||
private int defaultTTL = 3600;
|
||||
|
|
|
@ -66,7 +66,7 @@ public final class SOARecord extends Record<SOAData> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder extends Record.Builder<SOAData, Builder> {
|
||||
public static final class Builder extends Record.Builder<SOAData, Builder> {
|
||||
|
||||
private SerialStyle serialStyle;
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ public final class SessionCredentials extends Credentials {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder extends Credentials.Builder<SessionCredentials> {
|
||||
public static final class Builder extends Credentials.Builder<SessionCredentials> {
|
||||
private String customerName;
|
||||
private String userName;
|
||||
private String password;
|
||||
|
|
|
@ -156,7 +156,7 @@ public final class Zone {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String fqdn;
|
||||
private Type type;
|
||||
private int serial;
|
||||
|
|
|
@ -73,7 +73,7 @@ public class AAAAData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String address;
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,7 +74,7 @@ public class AData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String address;
|
||||
|
||||
/**
|
||||
|
|
|
@ -75,7 +75,7 @@ public class CNAMEData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String cname;
|
||||
|
||||
/**
|
||||
|
|
|
@ -89,7 +89,7 @@ public class MXData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private int preference = -1;
|
||||
private String exchange;
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ public class NSData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String nsdname;
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,7 +74,7 @@ public class PTRData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String ptrdname;
|
||||
|
||||
/**
|
||||
|
|
|
@ -145,7 +145,7 @@ public class SOAData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String mname;
|
||||
private String rname;
|
||||
private int serial = -1;
|
||||
|
|
|
@ -113,7 +113,7 @@ public class SRVData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private int priority = -1;
|
||||
private int weight = -1;
|
||||
private int port = -1;
|
||||
|
|
|
@ -85,7 +85,7 @@ public class SSHFPData extends ForwardingMap<String, Object> {
|
|||
return fingerprint;
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private int algorithm;
|
||||
private int fptype;
|
||||
private String fingerprint;
|
||||
|
|
|
@ -74,7 +74,7 @@ public class TXTData extends ForwardingMap<String, Object> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String txtdata;
|
||||
|
||||
/**
|
||||
|
|
|
@ -92,7 +92,7 @@ public final class AccountLevelGroup {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String id;
|
||||
private String name;
|
||||
private Type type;
|
||||
|
|
|
@ -92,7 +92,7 @@ public class DirectionalGroup extends ForwardingMultimap<String, String> {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String name;
|
||||
private Optional<String> description = Optional.absent();
|
||||
private ImmutableMultimap.Builder<String, String> regionToTerritories = ImmutableMultimap
|
||||
|
|
|
@ -107,7 +107,7 @@ public class DirectionalGroupCoordinates {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String zoneName;
|
||||
private String recordName;
|
||||
private int recordType = -1;
|
||||
|
|
|
@ -175,7 +175,7 @@ public final class DirectionalPool {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String zoneId;
|
||||
private String id;
|
||||
private Optional<String> name = Optional.absent();
|
||||
|
|
|
@ -103,7 +103,7 @@ public class DirectionalPoolRecord {
|
|||
return drBuilder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String type;
|
||||
private int ttl = -1;
|
||||
private boolean noResponseRecord;
|
||||
|
|
|
@ -117,7 +117,7 @@ public class DirectionalPoolRecordDetail {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String zoneName;
|
||||
private String name;
|
||||
private String id;
|
||||
|
|
|
@ -148,7 +148,7 @@ public final class PoolRecordSpec {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String description;
|
||||
private String state;
|
||||
private boolean probingEnabled;
|
||||
|
|
|
@ -104,7 +104,7 @@ public class ResourceRecord {
|
|||
return rrBuilder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String dName;
|
||||
private int type = -1;
|
||||
private int ttl = -1;
|
||||
|
|
|
@ -105,7 +105,7 @@ public class ResourceRecordDetail {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String zoneId;
|
||||
private String guid;
|
||||
private String zoneName;
|
||||
|
|
|
@ -100,7 +100,7 @@ public final class RoundRobinPool {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String zoneId;
|
||||
private String id;
|
||||
private String name;
|
||||
|
|
|
@ -114,7 +114,7 @@ public final class Task {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String guid;
|
||||
private StatusCode statusCode;
|
||||
private Optional<String> message = Optional.absent();
|
||||
|
|
|
@ -156,7 +156,7 @@ public final class TrafficControllerPool {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String zoneId;
|
||||
private String id;
|
||||
private String name;
|
||||
|
|
|
@ -165,7 +165,7 @@ public final class TrafficControllerPoolRecordDetail {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String id;
|
||||
private String poolId;
|
||||
private TrafficControllerPoolRecord record;
|
||||
|
|
|
@ -146,7 +146,7 @@ public final class UpdatePoolRecord {
|
|||
return new Builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String rdata;
|
||||
private String mode;
|
||||
private int priority;
|
||||
|
|
|
@ -191,7 +191,7 @@ public final class Zone {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String id;
|
||||
private String name;
|
||||
private Type type;
|
||||
|
|
|
@ -112,7 +112,7 @@ public final class ZoneProperties {
|
|||
return builder().from(this);
|
||||
}
|
||||
|
||||
public final static class Builder {
|
||||
public static final class Builder {
|
||||
private String name;
|
||||
private Type type;
|
||||
private int typeCode = -1;
|
||||
|
|
|
@ -17,7 +17,6 @@
|
|||
* under the License.
|
||||
*/
|
||||
package org.jclouds.ultradns.ws.handlers;
|
||||
import static org.jclouds.ultradns.ws.handlers.UltraDNSWSErrorHandler.ErrorCodes.*;
|
||||
import static org.jclouds.http.HttpUtils.closeClientButKeepContentStream;
|
||||
import static org.jclouds.http.HttpUtils.releasePayload;
|
||||
|
||||
|
@ -124,22 +123,22 @@ public class UltraDNSWSErrorHandler implements HttpErrorHandler {
|
|||
private Exception refineException(UltraDNSWSResponseException exception) {
|
||||
String message = exception.getError().getDescription().or(exception.getMessage());
|
||||
switch (exception.getError().getCode()) {
|
||||
case UNKNOWN:
|
||||
case ErrorCodes.UNKNOWN:
|
||||
if (!exception.getError().getDescription().isPresent())
|
||||
return exception;
|
||||
if (exception.getError().getDescription().get().indexOf("Cannot find") == -1)
|
||||
return exception;
|
||||
case ZONE_NOT_FOUND:
|
||||
case RESOURCE_RECORD_NOT_FOUND:
|
||||
case ACCOUNT_NOT_FOUND:
|
||||
case POOL_NOT_FOUND:
|
||||
case DIRECTIONAL_POOL_NOT_FOUND:
|
||||
case POOL_RECORD_NOT_FOUND:
|
||||
case GROUP_NOT_FOUND:
|
||||
case ErrorCodes.ZONE_NOT_FOUND:
|
||||
case ErrorCodes.RESOURCE_RECORD_NOT_FOUND:
|
||||
case ErrorCodes.ACCOUNT_NOT_FOUND:
|
||||
case ErrorCodes.POOL_NOT_FOUND:
|
||||
case ErrorCodes.DIRECTIONAL_POOL_NOT_FOUND:
|
||||
case ErrorCodes.POOL_RECORD_NOT_FOUND:
|
||||
case ErrorCodes.GROUP_NOT_FOUND:
|
||||
return new ResourceNotFoundException(message, exception);
|
||||
case ZONE_ALREADY_EXISTS:
|
||||
case RESOURCE_RECORD_ALREADY_EXISTS:
|
||||
case POOL_ALREADY_EXISTS:
|
||||
case ErrorCodes.ZONE_ALREADY_EXISTS:
|
||||
case ErrorCodes.RESOURCE_RECORD_ALREADY_EXISTS:
|
||||
case ErrorCodes.POOL_ALREADY_EXISTS:
|
||||
return new ResourceAlreadyExistsException(message, exception);
|
||||
}
|
||||
return exception;
|
||||
|
|
|
@ -24,9 +24,9 @@ import static org.jclouds.util.SaxUtils.equalsOrSuffix;
|
|||
import java.util.Map;
|
||||
|
||||
import org.jclouds.http.functions.ParseSax;
|
||||
import static org.jclouds.ultradns.ws.domain.IdAndName.*;
|
||||
import org.jclouds.ultradns.ws.domain.DirectionalPoolRecord;
|
||||
import org.jclouds.ultradns.ws.domain.DirectionalPoolRecordDetail;
|
||||
import org.jclouds.ultradns.ws.domain.IdAndName;
|
||||
import org.xml.sax.Attributes;
|
||||
|
||||
/**
|
||||
|
@ -64,14 +64,14 @@ public class DirectionalPoolRecordDetailHandler extends
|
|||
drd.id(attributes.get("DirPoolRecordId"));
|
||||
}
|
||||
if (attributes.containsKey("GroupId")) {
|
||||
drd.group(create(attributes.get("GroupId"), attributes.get("GroupName")));
|
||||
drd.group(IdAndName.create(attributes.get("GroupId"), attributes.get("GroupName")));
|
||||
}
|
||||
if (attributes.containsKey("GeolocationGroupId")) {
|
||||
drd.geolocationGroup(create(attributes.get("GeolocationGroupId"),
|
||||
drd.geolocationGroup(IdAndName.create(attributes.get("GeolocationGroupId"),
|
||||
attributes.get("GeolocationGroupName")));
|
||||
}
|
||||
if (attributes.containsKey("SourceIPGroupId")) {
|
||||
drd.sourceIpGroup(create(attributes.get("SourceIPGroupId"), attributes.get("SourceIPGroupName")));
|
||||
drd.sourceIpGroup(IdAndName.create(attributes.get("SourceIPGroupId"), attributes.get("SourceIPGroupName")));
|
||||
}
|
||||
if (attributes.containsKey("recordType")) {
|
||||
dr.type(attributes.get("recordType"));
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
<module name="TreeWalker">
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="IllegalThrows"/>
|
||||
<!--
|
||||
jclouds prefers 120 character line lengths but has many files with
|
||||
longer lines
|
||||
|
@ -23,10 +22,6 @@
|
|||
<module name="MultipleVariableDeclarations"/>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="UnnecessaryParentheses"/>
|
||||
<module name="UnusedImports"/>
|
||||
<module name="InterfaceIsType">
|
||||
<property name="allowMarkerInterfaces" value="false"/>
|
||||
</module>
|
||||
</module>
|
||||
<module name="RegexpMultiline">
|
||||
<property name="format" value="=\s*new ArrayList<[^>]"/>
|
||||
|
|
Loading…
Reference in New Issue