Skip to content

Commit 1fc561b

Browse files
committed
Checkstyle: fixed braces.
1 parent a2c6773 commit 1fc561b

35 files changed

+117
-46
lines changed

src/main/java/com/github/dockerjava/api/model/AuthConfig.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ public String toString() {
7979
return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
8080
}
8181

82+
//CHECKSTYLE:OFF
8283
@Override
8384
public int hashCode() {
8485
final int prime = 31;
@@ -127,4 +128,5 @@ public boolean equals(Object obj) {
127128
return false;
128129
return true;
129130
}
131+
//CHECKSTYLE:ON
130132
}

src/main/java/com/github/dockerjava/api/model/Bind.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,9 @@ public boolean equals(Object obj) {
7272
Bind other = (Bind) obj;
7373
return new EqualsBuilder().append(path, other.getPath()).append(volume, other.getVolume())
7474
.append(accessMode, other.getAccessMode()).isEquals();
75-
} else
75+
} else {
7676
return super.equals(obj);
77+
}
7778
}
7879

7980
@Override

src/main/java/com/github/dockerjava/api/model/Device.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,9 @@ public boolean equals(Object obj) {
5252
return new EqualsBuilder().append(cGroupPermissions, other.getcGroupPermissions())
5353
.append(pathInContainer, other.getPathInContainer()).append(pathOnHost, other.getPathOnHost())
5454
.isEquals();
55-
} else
55+
} else {
5656
return super.equals(obj);
57+
}
5758
}
5859

5960
@Override

src/main/java/com/github/dockerjava/api/model/ExposedPort.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,8 +151,9 @@ public boolean equals(Object obj) {
151151
if (obj instanceof ExposedPort) {
152152
ExposedPort other = (ExposedPort) obj;
153153
return new EqualsBuilder().append(protocol, other.getProtocol()).append(port, other.getPort()).isEquals();
154-
} else
154+
} else {
155155
return super.equals(obj);
156+
}
156157
}
157158

158159
@Override

src/main/java/com/github/dockerjava/api/model/Frame.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ public String toString() {
2828
return String.format("%s: %s", streamType, new String(payload).trim());
2929
}
3030

31+
//CHECKSTYLE:OFF
3132
@Override
3233
public boolean equals(Object o) {
3334
if (this == o)
@@ -47,4 +48,5 @@ public int hashCode() {
4748
result = 31 * result + Arrays.hashCode(payload);
4849
return result;
4950
}
51+
//CHECKSTYLE:ON
5052
}

src/main/java/com/github/dockerjava/api/model/Identifier.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,11 @@ public class Identifier {
1414
public Identifier(Repository repository, String tag) {
1515
this.repository = repository;
1616

17-
if (tag == null)
17+
if (tag == null) {
1818
this.tag = Optional.absent();
19-
else
19+
} else {
2020
this.tag = Optional.of(tag);
21+
}
2122
}
2223

2324
/**
@@ -33,15 +34,17 @@ public static Identifier fromCompoundString(String identifier) {
3334
String[] parts = identifier.split("/");
3435
if (parts.length != 2) {
3536
String[] rhs = identifier.split(":");
36-
if (rhs.length != 2)
37+
if (rhs.length != 2) {
3738
return new Identifier(new Repository(identifier), null);
38-
else
39+
} else {
3940
return new Identifier(new Repository(rhs[0]), rhs[1]);
41+
}
4042
}
4143

4244
String[] rhs = parts[1].split(":");
43-
if (rhs.length != 2)
45+
if (rhs.length != 2) {
4446
return new Identifier(new Repository(identifier), null);
47+
}
4548

4649
return new Identifier(new Repository(parts[0] + "/" + rhs[0]), rhs[1]);
4750
}

src/main/java/com/github/dockerjava/api/model/Link.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,9 @@ public boolean equals(final Object obj) {
7474
if (obj instanceof Link) {
7575
final Link other = (Link) obj;
7676
return new EqualsBuilder().append(name, other.getName()).append(alias, other.getAlias()).isEquals();
77-
} else
77+
} else {
7878
return super.equals(obj);
79+
}
7980
}
8081

8182
@Override

src/main/java/com/github/dockerjava/api/model/LogConfig.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,8 +98,9 @@ public LoggingType deserialize(JsonParser jsonParser, DeserializationContext des
9898
JsonNode node = oc.readTree(jsonParser);
9999

100100
for (LoggingType loggingType : values()) {
101-
if (loggingType.getType().equals(node.asText()))
101+
if (loggingType.getType().equals(node.asText())) {
102102
return loggingType;
103+
}
103104
}
104105

105106
throw new IllegalArgumentException("No enum constant " + LoggingType.class + "." + node.asText());

src/main/java/com/github/dockerjava/api/model/PortBinding.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,9 @@ public boolean equals(Object obj) {
6464
PortBinding other = (PortBinding) obj;
6565
return new EqualsBuilder().append(binding, other.getBinding()).append(exposedPort, other.getExposedPort())
6666
.isEquals();
67-
} else
67+
} else {
6868
return super.equals(obj);
69+
}
6970
}
7071

7172
@Override

src/main/java/com/github/dockerjava/api/model/Ports.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,9 @@ public boolean equals(Object obj) {
249249
Binding other = (Binding) obj;
250250
return new EqualsBuilder().append(hostIp, other.getHostIp()).append(hostPort, other.getHostPort())
251251
.isEquals();
252-
} else
252+
} else {
253253
return super.equals(obj);
254+
}
254255
}
255256
}
256257

0 commit comments

Comments
 (0)