Skip to content

Commit 2028d20

Browse files
committed
Clean up the code
1 parent bb8f8b5 commit 2028d20

3 files changed

Lines changed: 36 additions & 43 deletions

File tree

.codestyle/checkstyle.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,9 +318,9 @@ limitations under the License.
318318
<!-- Checks for common coding problems -->
319319
<!-- See http://checkstyle.sf.net/config_coding.html -->
320320
<module name="CovariantEquals"/>
321-
<!-- <module name="DeclarationOrder">
321+
<module name="DeclarationOrder">
322322
<property name="ignoreConstructors" value="true"/>
323-
</module> -->
323+
</module>
324324
<module name="DefaultComesLast"/>
325325
<module name="EmptyStatement"/>
326326
<module name="EqualsAvoidNull"/>

core/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@ limitations under the License.
4444
<artifactId>maven-javadoc-plugin</artifactId>
4545
</plugin>
4646

47-
<plugin>
48-
<artifactId>maven-install-plugin</artifactId>
49-
</plugin>
50-
<plugin>
51-
<artifactId>maven-release-plugin</artifactId>
52-
</plugin>
53-
5447
<plugin>
5548
<groupId>org.apache.maven.plugins</groupId>
5649
<artifactId>maven-surefire-plugin</artifactId>

core/src/main/java/io/appulse/epmd/java/core/model/response/NodeInfo.java

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,40 @@
5050
@FieldDefaults(level = PRIVATE)
5151
public class NodeInfo implements DataSerializable {
5252

53+
boolean ok;
54+
55+
Optional<Integer> port;
56+
57+
Optional<NodeType> type;
58+
59+
Optional<Protocol> protocol;
60+
61+
Optional<Version> high;
62+
63+
Optional<Version> low;
64+
65+
Optional<String> name;
66+
67+
public NodeInfo () {
68+
port = empty();
69+
type = empty();
70+
protocol = empty();
71+
high = empty();
72+
low = empty();
73+
name = empty();
74+
}
75+
76+
@Builder
77+
public NodeInfo (boolean ok, Integer port, NodeType type, Protocol protocol, Version high, Version low, String name) {
78+
this.ok = ok;
79+
this.port = ofNullable(port);
80+
this.type = ofNullable(type);
81+
this.protocol = ofNullable(protocol);
82+
this.high = ofNullable(high);
83+
this.low = ofNullable(low);
84+
this.name = ofNullable(name);
85+
}
86+
5387
@Override
5488
public void write (@NonNull Bytes bytes) {
5589
if (!ok) {
@@ -86,38 +120,4 @@ public void read (@NonNull Bytes bytes) {
86120
val length = bytes.getShort();
87121
name = of(bytes.getString(length, ISO_8859_1));
88122
}
89-
90-
boolean ok;
91-
92-
Optional<Integer> port;
93-
94-
Optional<NodeType> type;
95-
96-
Optional<Protocol> protocol;
97-
98-
Optional<Version> high;
99-
100-
Optional<Version> low;
101-
102-
Optional<String> name;
103-
104-
public NodeInfo () {
105-
port = empty();
106-
type = empty();
107-
protocol = empty();
108-
high = empty();
109-
low = empty();
110-
name = empty();
111-
}
112-
113-
@Builder
114-
public NodeInfo (boolean ok, Integer port, NodeType type, Protocol protocol, Version high, Version low, String name) {
115-
this.ok = ok;
116-
this.port = ofNullable(port);
117-
this.type = ofNullable(type);
118-
this.protocol = ofNullable(protocol);
119-
this.high = ofNullable(high);
120-
this.low = ofNullable(low);
121-
this.name = ofNullable(name);
122-
}
123123
}

0 commit comments

Comments
 (0)