From a40e940ff0d3c24342a460c2f1b19a24cc01185d Mon Sep 17 00:00:00 2001 From: Vlad Dumitrescu Date: Wed, 10 Sep 2014 09:47:22 +0200 Subject: remove unnecessary null pointer checks --- lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java | 6 ------ 1 file changed, 6 deletions(-) (limited to 'lib/jinterface') 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 1868dc7740..cf4e0ea98f 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpEpmd.java @@ -310,9 +310,7 @@ public class OtpEpmd { final int n = s.getInputStream().read(tmpbuf); if (n < 0) { - if (s != null) { s.close(); - } throw new IOException("Nameserver not responding on " + node.host() + " when publishing " + node.alive()); } @@ -341,9 +339,7 @@ public class OtpEpmd { throw new IOException("Nameserver not responding on " + node.host() + " when publishing " + node.alive()); } catch (final OtpErlangDecodeException e) { - if (s != null) { s.close(); - } if (traceLevel >= traceThreshold) { System.out.println("<- (invalid response)"); } @@ -351,9 +347,7 @@ public class OtpEpmd { + " when publishing " + node.alive()); } - if (s != null) { s.close(); - } return null; } -- cgit v1.2.3