From ee29a8aa733fbf1a1666b2f85a9fd6ff19d777b3 Mon Sep 17 00:00:00 2001 From: Vlad Dumitrescu Date: Fri, 1 Feb 2013 09:17:16 +0100 Subject: fix bug in OtpErlangTuple constructor The elems field would remain unitialized if the count parameter is zero in constructor --- lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/jinterface') diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java index b3a1021992..b97af5cfa0 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangTuple.java @@ -84,13 +84,13 @@ public class OtpErlangTuple extends OtpErlangObject implements Serializable, * if the array is empty (null) or contains null * elements. */ - public OtpErlangTuple(OtpErlangObject[] elems, final int start, + public OtpErlangTuple(final OtpErlangObject[] elems, final int start, final int count) { if (elems == null) { throw new java.lang.IllegalArgumentException( "Tuple content can't be null"); } else if (count < 1) { - elems = NO_ELEMENTS; + this.elems = NO_ELEMENTS; } else { this.elems = new OtpErlangObject[count]; for (int i = 0; i < count; i++) { -- cgit v1.2.3