From 0725d5cdf30b740b5c90b9fd355401161f14f401 Mon Sep 17 00:00:00 2001 From: Vlad Dumitrescu Date: Mon, 19 May 2014 12:18:58 +0200 Subject: jinterface: fix bug in equality for OtpErlangFun Arrays (here: md5 and freeVars) must not be compared with equals, which is broken. --- lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/jinterface/java_src/com') diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java index fc104e9564..c52909acc5 100644 --- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java +++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangFun.java @@ -94,7 +94,7 @@ public class OtpErlangFun extends OtpErlangObject implements Serializable { return false; } } else { - if (!md5.equals(f.md5)) { + if (!Arrays.equals(md5, f.md5)) { return false; } } @@ -104,7 +104,7 @@ public class OtpErlangFun extends OtpErlangObject implements Serializable { if (freeVars == null) { return f.freeVars == null; } - return freeVars.equals(f.freeVars); + return Arrays.equals(freeVars, f.freeVars); } @Override -- cgit v1.2.3