Skip to content

Commit 5848537

Browse files
committed
Fix checkstyle errors
1 parent a36e2d5 commit 5848537

53 files changed

Lines changed: 75 additions & 75 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

apis/cloudstack/src/test/java/org/jclouds/cloudstack/features/OfferingApiLiveTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ public void testListDiskOfferings() throws Exception {
5858
assert offering.getName() != null : offering;
5959
assert offering.getCreated() != null : offering;
6060
assert offering.getDisplayText() != null : offering;
61-
assert offering.getDiskSize() > 0 || (offering.getDiskSize() == 0 && offering.isCustomized()) : offering;
61+
assert offering.getDiskSize() > 0 || offering.getDiskSize() == 0 && offering.isCustomized() : offering;
6262
assert offering.getTags() != null : offering;
6363

6464
} catch (NoSuchElementException e) {

apis/docker/src/main/java/org/jclouds/docker/compute/options/DockerTemplateOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public boolean equals(Object o) {
159159
* Compares two Config.Builder instances.
160160
*/
161161
private boolean buildersEqual(Config.Builder b1, Config.Builder b2) {
162-
return b1 == b2 || (b1 != null && b2 != null && b1.build().equals(b2.build()));
162+
return b1 == b2 || b1 != null && b2 != null && b1.build().equals(b2.build());
163163
}
164164

165165
@Override

apis/docker/src/main/java/org/jclouds/docker/handlers/DockerErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public void handleError(HttpCommand command, HttpResponse response) {
5555
switch (response.getStatusCode()) {
5656
case 400:
5757
if ((command.getCurrentRequest().getEndpoint().getPath().endsWith("/info"))
58-
|| (message != null && message.indexOf("could not be found") != -1))
58+
|| message != null && message.indexOf("could not be found") != -1)
5959
exception = new ResourceNotFoundException(message, exception);
6060
else if (message != null && message.indexOf("currently in use") != -1)
6161
exception = new IllegalStateException(message, exception);

apis/ec2/src/main/java/org/jclouds/ec2/binders/BindUserGroupsToIndexedFormParams.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public <R extends HttpRequest> R bindToRequest(R request, Object input) {
4343
private void checkValidUserGroup(Object input) {
4444
Iterable<?> values = (Iterable<?>) input;
4545
long size = Iterables.size(values);
46-
checkArgument(size == 0 || (size == 1 && Iterables.getOnlyElement(values).equals("all")),
46+
checkArgument(size == 0 || size == 1 && Iterables.getOnlyElement(values).equals("all"),
4747
"only supported UserGroup is 'all'");
4848
}
4949

apis/ec2/src/main/java/org/jclouds/ec2/compute/domain/EC2HardwareBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public EC2HardwareBuilder virtualizationType(VirtualizationType virtualizationTy
135135
return this;
136136
}
137137

138-
public EC2HardwareBuilder virtualizationTypes(VirtualizationType ...virtualizationTypes) {
138+
public EC2HardwareBuilder virtualizationTypes(VirtualizationType...virtualizationTypes) {
139139
Preconditions.checkNotNull(virtualizationTypes, "virtualizationTypes");
140140
Preconditions.checkArgument(virtualizationTypes.length > 0, "At least one virtualization type is required.");
141141
if (virtualizationTypes.length == 1) {

apis/elasticstack/src/main/java/org/jclouds/elasticstack/handlers/ElasticStackErrorHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public void handleError(HttpCommand command, HttpResponse response) {
5656
switch (response.getStatusCode()) {
5757
case 400:
5858
if ((command.getCurrentRequest().getEndpoint().getPath().endsWith("/info"))
59-
|| (message != null && message.indexOf("could not be found") != -1))
59+
|| message != null && message.indexOf("could not be found") != -1)
6060
exception = new ResourceNotFoundException(message, exception);
6161
else
6262
exception = new IllegalArgumentException(message, exception);

apis/filesystem/src/main/java/org/jclouds/filesystem/strategy/internal/FilesystemStorageStrategyImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -915,11 +915,11 @@ private String removeFileSeparatorFromBorders(String pathToBeCleaned, boolean on
915915

916916
// search for separator chars
917917
if (!onlyTrailing) {
918-
if (pathToBeCleaned.charAt(0) == '/' || (pathToBeCleaned.charAt(0) == '\\' && isWindows()))
918+
if (pathToBeCleaned.charAt(0) == '/' || pathToBeCleaned.charAt(0) == '\\' && isWindows())
919919
beginIndex = 1;
920920
}
921921
if (pathToBeCleaned.charAt(pathToBeCleaned.length() - 1) == '/' ||
922-
(pathToBeCleaned.charAt(pathToBeCleaned.length() - 1) == '\\' && isWindows()))
922+
pathToBeCleaned.charAt(pathToBeCleaned.length() - 1) == '\\' && isWindows())
923923
endIndex--;
924924

925925
return pathToBeCleaned.substring(beginIndex, endIndex);

apis/glacier/src/main/java/org/jclouds/glacier/blobstore/strategy/internal/BasePollingStrategy.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ public BasePollingStrategy(GlacierClient client) {
5454

5555
private boolean inProgress(String job, String vault) {
5656
JobMetadata jobMetadata = client.describeJob(vault, job);
57-
return (jobMetadata != null) && (jobMetadata.getStatusCode() == JobStatus.IN_PROGRESS);
57+
return jobMetadata != null && jobMetadata.getStatusCode() == JobStatus.IN_PROGRESS;
5858
}
5959

6060
private boolean succeeded(String job, String vault) {
6161
JobMetadata jobMetadata = client.describeJob(vault, job);
62-
return (jobMetadata != null) && (jobMetadata.getStatusCode() == JobStatus.SUCCEEDED);
62+
return jobMetadata != null && jobMetadata.getStatusCode() == JobStatus.SUCCEEDED;
6363
}
6464

6565
@Override

apis/glacier/src/main/java/org/jclouds/glacier/domain/GlacierError.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public String getType() {
5151
}
5252

5353
public boolean isValid() {
54-
return (this.code != null) && (this.message != null) && (this.type != null);
54+
return this.code != null && this.message != null && this.type != null;
5555
}
5656

5757
@Override

apis/openstack-neutron/src/main/java/org/jclouds/openstack/neutron/v2/fallbacks/EmptyFloatingIPsFallback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
public class EmptyFloatingIPsFallback implements Fallback<FloatingIPs> {
3030
@Override
3131
public FloatingIPs createOrPropagate(Throwable t) throws Exception {
32-
if ((getFirstThrowableOfType(checkNotNull(t, "throwable"), ResourceNotFoundException.class) != null)
32+
if (getFirstThrowableOfType(checkNotNull(t, "throwable"), ResourceNotFoundException.class) != null
3333
|| contains404(t)) {
3434
return FloatingIPs.EMPTY;
3535
}

0 commit comments

Comments
 (0)