aboutsummaryrefslogtreecommitdiffstats
path: root/lib/jinterface/test
diff options
context:
space:
mode:
authorVlad Dumitrescu <[email protected]>2014-09-10 11:56:34 +0200
committerVlad Dumitrescu <[email protected]>2014-09-11 21:24:28 +0200
commit4390e435584d57b5fb41309f80043cb954c241cd (patch)
tree258906e327cdfc2d191b48b00456c1c032c99fb0 /lib/jinterface/test
parent4733f3f7abb7c815bf1e1295bf0a55526e318d66 (diff)
downloadotp-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/test')
-rw-r--r--lib/jinterface/test/nc_SUITE_data/echo_server.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/jinterface/test/nc_SUITE_data/echo_server.java b/lib/jinterface/test/nc_SUITE_data/echo_server.java
index fc9a1a22da..0e43ea0680 100644
--- a/lib/jinterface/test/nc_SUITE_data/echo_server.java
+++ b/lib/jinterface/test/nc_SUITE_data/echo_server.java
@@ -148,11 +148,13 @@ public class echo_server {
final String atomValue = ((OtpErlangAtom) t).atomValue();
if (atomValue.equals("binary") && i instanceof OtpErlangBinary) {
final OtpErlangBinary b = (OtpErlangBinary) i;
+ @SuppressWarnings("resource")
final OtpInputStream bis = new OtpInputStream(b.binaryValue(),
0);
final OtpErlangObject o = bis.read_any();
return o;
} else if (atomValue.equals("compress")) {
+ @SuppressWarnings("resource")
final OtpOutputStream oos = new OtpOutputStream();
oos.write1(OtpExternal.versionTag);
oos.write_compressed(i);