diff options
author | Vlad Dumitrescu <[email protected]> | 2014-09-10 11:56:34 +0200 |
---|---|---|
committer | Vlad Dumitrescu <[email protected]> | 2014-09-11 21:24:28 +0200 |
commit | 4390e435584d57b5fb41309f80043cb954c241cd (patch) | |
tree | 258906e327cdfc2d191b48b00456c1c032c99fb0 /lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java | |
parent | 4733f3f7abb7c815bf1e1295bf0a55526e318d66 (diff) | |
download | otp-4390e435584d57b5fb41309f80043cb954c241cd.tar.gz otp-4390e435584d57b5fb41309f80043cb954c241cd.tar.bz2 otp-4390e435584d57b5fb41309f80043cb954c241cd.zip |
silence 'potential resource leak' warnings
OtpInputStream and OtoOutputStream don't need closing (they are
ByteArray*Streams)
Diffstat (limited to 'lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java')
-rw-r--r-- | lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java index cf4e0ea98f..8a8ba785d9 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java @@ -160,6 +160,7 @@ public class OtpEpmd { try { s = new Socket((String) null, EpmdPort.get()); + @SuppressWarnings("resource") final OtpOutputStream obuf = new OtpOutputStream(); obuf.write2BE(node.alive().length() + 1); obuf.write1(stopReq); @@ -189,6 +190,7 @@ public class OtpEpmd { Socket s = null; try { + @SuppressWarnings("resource") final OtpOutputStream obuf = new OtpOutputStream(); s = new Socket(node.host(), EpmdPort.get()); @@ -219,6 +221,7 @@ public class OtpEpmd { + node.host() + " when looking up " + node.alive()); } + @SuppressWarnings("resource") final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0); final int response = ibuf.read1(); @@ -279,6 +282,7 @@ public class OtpEpmd { Socket s = null; try { + @SuppressWarnings("resource") final OtpOutputStream obuf = new OtpOutputStream(); s = new Socket((String) null, EpmdPort.get()); @@ -315,6 +319,7 @@ public class OtpEpmd { + node.host() + " when publishing " + node.alive()); } + @SuppressWarnings("resource") final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0); final int response = ibuf.read1(); @@ -360,6 +365,7 @@ public class OtpEpmd { Socket s = null; try { + @SuppressWarnings("resource") final OtpOutputStream obuf = new OtpOutputStream(); try { s = new Socket(address, EpmdPort.get()); @@ -384,6 +390,7 @@ public class OtpEpmd { out.write(buffer, 0, bytesRead); } final byte[] tmpbuf = out.toByteArray(); + @SuppressWarnings("resource") final OtpInputStream ibuf = new OtpInputStream(tmpbuf, 0); ibuf.read4BE(); // read port int // final int port = ibuf.read4BE(); |