aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-10-01 09:58:13 +0200
committerMarcus Arendt <[email protected]>2014-10-01 09:58:13 +0200
commit40bfc04288f623d7dbabc90f0c93c6baef997ba7 (patch)
treea2c2cdd9cd744b72679d23fb7a1cb380c29ee920 /lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
parent0e1adc9d399f5854d5b789e5d6a32a92a6ea0d74 (diff)
parentfd0b19efafcd146f96aa98fbb2c996b6e2ca9e98 (diff)
downloadotp-40bfc04288f623d7dbabc90f0c93c6baef997ba7.tar.gz
otp-40bfc04288f623d7dbabc90f0c93c6baef997ba7.tar.bz2
otp-40bfc04288f623d7dbabc90f0c93c6baef997ba7.zip
Merge branch 'vladdu/jinterface_code_cleanup/OTP-12211' into maint
* vladdu/jinterface_code_cleanup/OTP-12211: fix warning: Socket's InputStream not closed silence 'potential resource leak' warnings don't warn about some unused fields/variables handle warnings about potential null pointers keep all method parameters final renamed method parameters hiding fields add 'break' statements to make compiler happy remove warnings from OtpMD5 rename OtpNode.flags to connFlags rename OtpNode.Acceptor.port to acceptorPort rename field 'self' to 'localNode' mark deprecated unused private constructor simplify 'if' statements remove warnings: @Override, switch fall-through make serialVersionUID fields private remove unnecessary syntax (casts) remove unused variables removed unnecessary semicolons, imports, labels remove unnecessary null pointer checks remove unnecessary Cloneable and Serializable
Diffstat (limited to 'lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java')
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java b/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
index 51ea15b5ef..06ddfa2d61 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
+++ b/lib/jinterface/test/jinterface_SUITE_data/NodeStatusHandler.java
@@ -17,7 +17,14 @@
* %CopyrightEnd%
*/
-import com.ericsson.otp.erlang.*;
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangBoolean;
+import com.ericsson.otp.erlang.OtpErlangObject;
+import com.ericsson.otp.erlang.OtpErlangString;
+import com.ericsson.otp.erlang.OtpErlangTuple;
+import com.ericsson.otp.erlang.OtpMbox;
+import com.ericsson.otp.erlang.OtpNode;
+import com.ericsson.otp.erlang.OtpNodeStatus;
public class NodeStatusHandler extends OtpNodeStatus {
/*
@@ -86,7 +93,10 @@ public class NodeStatusHandler extends OtpNodeStatus {
}
OtpErlangObject o = mbox.receive(recTime);
- if (o == null) System.exit(2);
+ if (o == null) {
+ System.exit(2);
+ return;
+ }
if (! ((OtpErlangAtom)o).atomValue().equals("done"))
System.exit(3);
@@ -100,6 +110,7 @@ public class NodeStatusHandler extends OtpNodeStatus {
+ @Override
public void remoteStatus(String node, boolean up, Object info) {
try {
dbg("Got remoteStatus: " + node + " " + up + " " + info);
@@ -120,6 +131,7 @@ public class NodeStatusHandler extends OtpNodeStatus {
}
+ @Override
public void localStatus(String node, boolean up, Object info) {
try {
dbg("Got localStatus: " + node + " " + up + " " + info);
@@ -141,6 +153,7 @@ public class NodeStatusHandler extends OtpNodeStatus {
+@Override
public void connAttempt(String node, boolean incoming, Object info) {
try {
dbg("Got connAttempt: " + node + " " + incoming + " " + info);