Add whitespace after semicolons

Also correct some bad line-wrapping.
This commit is contained in:
Andrew Gaul 2014-08-26 10:55:56 -07:00
parent 614f5194ef
commit 74fb8f0183
26 changed files with 40 additions and 48 deletions

View File

@ -144,7 +144,7 @@ public class AtmosAsyncBlobStore extends BaseAsyncBlobStore {
public ListenableFuture<Void> createDirectory(String container, String directory) {
return transform(async.createDirectory(container + "/" + directory), new Function<URI, Void>() {
public Void apply(URI from) {
return null;// no etag
return null; // no etag
}
}, userExecutor);
}

View File

@ -114,7 +114,7 @@ public class ParseTypedAsyncJob implements Function<AsyncJob<Map<String, JsonBal
} else if (toParse.getResult().containsKey("errorcode")) {
@SuppressWarnings({"unchecked", "rawtypes"})
Builder<?, Object> builder = AsyncJob.Builder.fromAsyncJobUntyped((AsyncJob) toParse);
builder.result(null);// avoid classcastexceptions
builder.result(null); // avoid classcastexceptions
builder.error(AsyncJobError.builder().errorCode(ErrorCode.fromValue(toParse.getResult().get("errorcode").toString()))
.errorText(toParse.getResult().containsKey("errortext") ? toParse.getResult().get("errortext").toString().replace("\"", "") : null)
.build());

View File

@ -95,8 +95,8 @@ public class KeyPair implements Comparable<KeyPair> {
this.region = checkNotNull(region, "region");
this.keyName = checkNotNull(keyName, "keyName");
this.sha1OfPrivateKey = checkNotNull(sha1OfPrivateKey, "sha1OfPrivateKey");
this.keyMaterial = keyMaterial;// nullable on list
this.fingerprint = fingerprint;// nullable on list
this.keyMaterial = keyMaterial; // nullable on list
this.fingerprint = fingerprint; // nullable on list
}
/**

View File

@ -299,12 +299,12 @@ public class RunningInstance implements Comparable<RunningInstance> {
this.ipAddress = ipAddress;
this.kernelId = kernelId;
this.keyName = keyName;
this.launchTime = launchTime;// nullable on spot.
this.availabilityZone = availabilityZone;// nullable on spot.
this.launchTime = launchTime; // nullable on spot.
this.availabilityZone = availabilityZone; // nullable on spot.
this.virtualizationType = virtualizationType;
this.platform = platform;
this.privateDnsName = privateDnsName;// nullable on runinstances.
this.privateIpAddress = privateIpAddress;// nullable on runinstances.
this.privateDnsName = privateDnsName; // nullable on runinstances.
this.privateIpAddress = privateIpAddress; // nullable on runinstances.
this.ramdiskId = ramdiskId;
this.reason = reason;
this.rootDeviceType = checkNotNull(rootDeviceType, "rootDeviceType for %s/%s", region, instanceId);

View File

@ -35,7 +35,7 @@ public class BlockDeviceMappingHandler extends
private Map<String, BlockDevice> ebsBlockDevices = Maps.newHashMap();
private String deviceName;
private String volumeId;
private boolean deleteOnTermination = true;// correct default is true.
private boolean deleteOnTermination = true; // correct default is true.
private Attachment.Status attachmentStatus;
private Date attachTime;

View File

@ -91,7 +91,7 @@ public class DescribeImagesResponseHandler extends ParseSax.HandlerForGeneratedR
private Hypervisor hypervisor = Hypervisor.XEN;
private int volumeSize;
private boolean deleteOnTermination = true;// correct default is true.
private boolean deleteOnTermination = true; // correct default is true.
private boolean encrypted = false;
private String volumeType;
private Integer iops;

View File

@ -193,21 +193,12 @@ public class EBSBootEC2ApiLiveTest extends BaseComputeServiceContextLiveTest {
try {
System.out.printf("%d: running instance%n", System.currentTimeMillis());
Reservation<? extends RunningInstance> reservation = client.getInstanceApi().get().runInstancesInRegion(
null, null, // allow
// ec2
// to
// chose
// an
// availability
// zone
null, null, // allow ec2 to chose an availability zone
imageId, 1, // minimum instances
1, // maximum instances
withKeyName(keyPair.getKeyName())// key I created above
.asType(InstanceType.M1_SMALL)// smallest instance
// size
.withSecurityGroup(securityGroupName));// group I
// created
// above
withKeyName(keyPair.getKeyName()) // key created above
.asType(InstanceType.M1_SMALL) // smallest instance size
.withSecurityGroup(securityGroupName)); // group created above
instance = Iterables.getOnlyElement(reservation);
} catch (HttpResponseException htpe) {
if (htpe.getResponse().getStatusCode() == 400)

View File

@ -286,7 +286,7 @@ public class SecurityGroupApiLiveTest extends BaseComputeServiceContextLiveTest
protected void ensureGroupsExist(String group1Name, String group2Name) {
Set<SecurityGroup> twoResults = client.describeSecurityGroupsInRegion(null, group1Name, group2Name);
assertNotNull(twoResults);
assertTrue(twoResults.size() >= 2);// in VPC could be multiple groups with the same name
assertTrue(twoResults.size() >= 2); // in VPC could be multiple groups with the same name
assertTrue(all(twoResults, compose(in(ImmutableSet.of(group1Name, group2Name)),
new Function<SecurityGroup, String>() {

View File

@ -66,10 +66,10 @@ public class BaseLoadBalancer<N extends BaseNode<N>, T extends BaseLoadBalancer<
@Nullable Map<String, Boolean> connectionLogging, @Nullable ConnectionThrottle connectionThrottle,
@Nullable HealthMonitor healthMonitor) {
this.name = checkNotNull(name, "name");
this.protocol = protocol;// null on deleted LB
this.port = port;// null on deleted LB
this.protocol = protocol; // null on deleted LB
this.port = port; // null on deleted LB
this.nodes = ImmutableSortedSet.copyOf(checkNotNull(nodes, "nodes"));
this.algorithm = algorithm;// null on deleted LB
this.algorithm = algorithm; // null on deleted LB
this.timeout = timeout;
this.halfClosed = halfClosed;
this.sessionPersistence = sessionPersistence;

View File

@ -71,7 +71,7 @@ public class AccessRuleApiLiveTest extends BaseCloudLoadBalancersApiLiveTest {
CreateLoadBalancer createLB = CreateLoadBalancer.builder()
.name(prefix + "-jclouds").protocol("HTTP").port(80).virtualIPType(Type.PUBLIC).node(addNode).build();
region = "ORD";//Iterables.getFirst(api.getConfiguredRegions(), null);
region = "ORD"; //Iterables.getFirst(api.getConfiguredRegions(), null);
lb = api.getLoadBalancerApi(region).create(createLB);
assertTrue(awaitAvailable(api.getLoadBalancerApi(region)).apply(lb));

View File

@ -50,7 +50,7 @@ public class CatalogImpl extends LinkedHashMap<String, ReferenceType> implements
Map<String, ReferenceType> contents, Iterable<Task> tasks, boolean published, boolean readOnly) {
this.name = checkNotNull(name, "name");
this.type = checkNotNull(type, "type");
this.org = org;// TODO: once <1.0 is killed check not null
this.org = org; // TODO: once <1.0 is killed check not null
this.description = description;
this.href = checkNotNull(href, "href");
putAll(checkNotNull(contents, "contents"));

View File

@ -54,7 +54,7 @@ public class VAppImpl extends ReferenceTypeImpl implements VApp {
@Nullable VCloudNetworkSection networkSection) {
super(name, type, id);
this.status = checkNotNull(status, "status");
this.vdc = vdc;// TODO: once <1.0 is killed check not null
this.vdc = vdc; // TODO: once <1.0 is killed check not null
this.description = description;
Iterables.addAll(this.tasks, checkNotNull(tasks, "tasks"));
this.ovfDescriptorUploaded = ovfDescriptorUploaded;

View File

@ -56,7 +56,7 @@ public class VAppTemplateImpl extends ReferenceTypeImpl implements VAppTemplate
@Nullable VCloudNetworkSection networkSection) {
super(name, type, id);
this.status = checkNotNull(status, "status");
this.vdc = vdc;// TODO: once <1.0 is killed check not null
this.vdc = vdc; // TODO: once <1.0 is killed check not null
this.description = description;
Iterables.addAll(this.tasks, checkNotNull(tasks, "tasks"));
this.vAppScopedLocalId = vAppScopedLocalId;

View File

@ -62,13 +62,13 @@ public class VDCImpl extends ReferenceTypeImpl implements VDC {
int networkQuota, int vmQuota, boolean isEnabled) {
super(name, type, id);
this.status = checkNotNull(status, "status");
this.org = org;// TODO: once <1.0 is killed check not null
this.org = org; // TODO: once <1.0 is killed check not null
this.description = description;
Iterables.addAll(this.tasks, checkNotNull(tasks, "tasks"));
this.allocationModel = checkNotNull(allocationModel, "allocationModel");
this.storageCapacity = storageCapacity;// TODO: once <1.0 is killed check not null
this.cpuCapacity = cpuCapacity;// TODO: once <1.0 is killed check not null
this.memoryCapacity = memoryCapacity;// TODO: once <1.0 is killed check not null
this.storageCapacity = storageCapacity; // TODO: once <1.0 is killed check not null
this.cpuCapacity = cpuCapacity; // TODO: once <1.0 is killed check not null
this.memoryCapacity = memoryCapacity; // TODO: once <1.0 is killed check not null
this.resourceEntities.putAll(checkNotNull(resourceEntities, "resourceEntities"));
this.availableNetworks.putAll(checkNotNull(availableNetworks, "availableNetworks"));
this.nicQuota = nicQuota;

View File

@ -60,7 +60,7 @@ public class VmImpl extends ReferenceTypeImpl implements Vm {
@Nullable GuestCustomizationSection guestCustomization, @Nullable String vAppScopedLocalId) {
super(name, type, id);
this.status = status;
this.vApp = vApp;// TODO: once <1.0 is killed check not null
this.vApp = vApp; // TODO: once <1.0 is killed check not null
this.description = description;
Iterables.addAll(this.tasks, checkNotNull(tasks, "tasks"));
this.hardware = hardware;

View File

@ -175,7 +175,7 @@ final class ASN1Codec {
try {
return s.read();
} catch (IOException e) {
throw propagate(e);// impossible as we are only using a byte array
throw propagate(e); // impossible as we are only using a byte array
}
}

View File

@ -244,7 +244,7 @@ public final class Uris {
if (uri.length() < 5) // skip encoding if there's no valid variables set. ex. ((a)) is the left valid
return uri.toString();
char last = uri.charAt(0);// duplicates even if there are no special characters, but only requires 1 scan
char last = uri.charAt(0); // duplicates even if there are no special characters, but only requires 1 scan
StringBuilder builder = new StringBuilder();
for (char c : Lists.charactersOf(uri)) {
switch (c) {

View File

@ -254,7 +254,7 @@ public class RestAnnotationProcessor implements Function<Invocation, HttpRequest
Payload payload = null;
for (HttpRequestOptions options : findOptionsIn(invocation)) {
injector.injectMembers(options);// TODO test case
injector.injectMembers(options); // TODO test case
for (Entry<String, String> header : options.buildRequestHeaders().entries()) {
headers.put(header.getKey(), replaceTokens(header.getValue(), tokenValues));
}
@ -490,7 +490,7 @@ public class RestAnnotationProcessor implements Function<Invocation, HttpRequest
invocation.getInvokable());
Parameter endpointParam = get(endpointParams, 0);
Function<Object, URI> parser = injector.getInstance(endpointParam.getAnnotation(EndpointParam.class).parser());
int position = endpointParam.hashCode();// guava issue 1243
int position = endpointParam.hashCode(); // guava issue 1243
try {
URI returnVal = parser.apply(invocation.getArgs().get(position));
checkArgument(returnVal != null,

View File

@ -100,7 +100,7 @@ public class ConvertToGaeRequestTest {
HttpRequest request = HttpRequest.builder().method(HttpMethod.GET).endpoint(endPoint).build();
HTTPRequest gaeRequest = req.apply(request);
assert gaeRequest.getPayload() == null;
assertEquals(gaeRequest.getHeaders().size(), 1);// user agent
assertEquals(gaeRequest.getHeaders().size(), 1); // user agent
assertEquals(gaeRequest.getHeaders().get(0).getName(), HttpHeaders.USER_AGENT);
assertEquals(gaeRequest.getHeaders().get(0).getValue(), "jclouds/1.0 urlfetch/1.4.3");
}

View File

@ -74,7 +74,7 @@ public class JschSshClientModule extends AbstractModule {
@Override
public SshClient create(HostAndPort socket, LoginCredentials credentials) {
SshClient client = new JschSshClient(proxyConfig, backoffLimitedRetryHandler, socket, credentials, timeout, getAgentConnector());
injector.injectMembers(client);// add logger
injector.injectMembers(client); // add logger
return client;
}

View File

@ -70,7 +70,7 @@ public class SshjSshClientModule extends AbstractModule {
@Override
public SshClient create(HostAndPort socket, LoginCredentials credentials) {
SshClient client = new SshjSshClient(backoffLimitedRetryHandler, socket, credentials, timeout, getAgentConnector());
injector.injectMembers(client);// add logger
injector.injectMembers(client); // add logger
return client;
}

View File

@ -143,7 +143,7 @@ public class BaseLoadBalancerService implements LoadBalancerService {
return false;
}
}
}, 3000, 1000, MILLISECONDS);// TODO make timeouts class like ComputeServiceconstants
}, 3000, 1000, MILLISECONDS); // TODO make timeouts class like ComputeServiceconstants
boolean successful = tester.apply(id) && loadBalancer.get() == null; // TODO add load
// balancerTerminated
// retryable predicate

View File

@ -98,7 +98,7 @@ public class AWSEC2ComputeServiceLiveTest extends EC2ComputeServiceLiveTest {
try {
cleanupExtendedStuffInRegion(region, securityGroupApi, keyPairApi, group);
Thread.sleep(3000);// eventual consistency if deletes actually occurred.
Thread.sleep(3000); // eventual consistency if deletes actually occurred.
// create a security group that allows ssh in so that our scripts later
// will work

View File

@ -86,7 +86,7 @@ public class AWSSecurityGroupApiLiveTest extends SecurityGroupApiLiveTest {
group1Name, group1Name);
final String group2Id = AWSSecurityGroupApi.class.cast(client).createSecurityGroupInRegionAndReturnId(null,
group2Name, group2Name);
Thread.sleep(100);// eventual consistent
Thread.sleep(100); // eventual consistent
ensureGroupsExist(group1Name, group2Name);
AWSSecurityGroupApi.class.cast(client).authorizeSecurityGroupIngressInRegion(null, group1Id,
IpPermissions.permit(IpProtocol.TCP).port(80));

View File

@ -145,7 +145,7 @@ public class DynECTParserModule extends AbstractModule {
private static class CreepyGeoService {
String name;
String active;// creepy part
String active; // creepy part
int ttl;
List<Node> nodes;
List<GeoRegionGroup> groups;

View File

@ -290,4 +290,5 @@ public interface GridServerApi {
@OnlyElement
@Path("/grid/server/edit")
Server editServerType(@QueryParam("id") long id,
@QueryParam("server.type") String newType);}
@QueryParam("server.type") String newType);
}