aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMarcus Arendt <[email protected]>2014-10-01 09:58:05 +0200
committerMarcus Arendt <[email protected]>2014-10-01 09:58:05 +0200
commit0e1adc9d399f5854d5b789e5d6a32a92a6ea0d74 (patch)
tree22a49de1c2e01feb7914e1d06cd24d63a1a63dad /lib
parent88d5c0edbd08e069bc20cf13fa90bca59eb43e86 (diff)
parentb64eb80453cdaac936eba1e46f814f4e8b92f65b (diff)
downloadotp-0e1adc9d399f5854d5b789e5d6a32a92a6ea0d74.tar.gz
otp-0e1adc9d399f5854d5b789e5d6a32a92a6ea0d74.tar.bz2
otp-0e1adc9d399f5854d5b789e5d6a32a92a6ea0d74.zip
Merge branch 'vladdu/jinterface_findbugs/OTP-12210' into maint
* vladdu/jinterface_findbugs/OTP-12210: OtpErlangList.clone must not return null handle empty .erlang.cookie without crashing
Diffstat (limited to 'lib')
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java7
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java2
2 files changed, 7 insertions, 2 deletions
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
index 3ef44b8851..3c15978b52 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
@@ -128,7 +128,12 @@ public class AbstractNode {
final File dotCookieFile = new File(dotCookieFilename);
br = new BufferedReader(new FileReader(dotCookieFile));
- defaultCookie = br.readLine().trim();
+ final String line = br.readLine();
+ if (line == null) {
+ defaultCookie = "";
+ } else {
+ defaultCookie = line.trim();
+ }
} catch (final IOException e) {
defaultCookie = "";
} finally {
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
index 3456fd7412..e363fdb457 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangList.java
@@ -326,7 +326,7 @@ public class OtpErlangList extends OtpErlangObject implements
try {
return new OtpErlangList(elements(), getLastTail());
} catch (final OtpErlangException e) {
- return null;
+ throw new AssertionError(this);
}
}