Loading README.md +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ Available versions: | JInterface | Erlang versions supported | |------------|---------------------------| | 1.12 | >=24, <24.1 | | 1.11.1 | >=23.3, <23.3.4.12 | | 1.11 | >=23, <23.3 | | 1.10.1 | >=22.1, <23 | Loading java_src/com/ericsson/otp/erlang/AbstractNode.java +3 −1 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ public class AbstractNode implements OtpTransportFactory { static final int dFlagBigCreation = 0x40000; static final int dFlagHandshake23 = 0x1000000; static final int dFlagUnlinkId = 0x2000000; static final long dFlagV4PidsRefs = 0x4L << 32; int ntype = NTYPE_R6; int proto = 0; // tcp/ip Loading @@ -107,7 +108,8 @@ public class AbstractNode implements OtpTransportFactory { | dFlagExportPtrTag | dFlagBigCreation | dFlagHandshake23 | dFlagUnlinkId; | dFlagUnlinkId | dFlagV4PidsRefs; /* initialize hostname and default cookie */ static { Loading java_src/com/ericsson/otp/erlang/OtpErlangExternalFun.java +3 −3 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ public class OtpErlangExternalFun extends OtpErlangObject { // don't change this! private static final long serialVersionUID = 6443965570641913886L; private final String module; private final String function; private final int arity; public final String module; public final String function; public final int arity; public OtpErlangExternalFun(final String module, final String function, final int arity) { Loading java_src/com/ericsson/otp/erlang/OtpErlangPort.java +6 −5 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ public class OtpErlangPort extends OtpErlangObject { private static final long serialVersionUID = 4037115468007644704L; private final String node; private final int id; private final long id; private final int creation; /* Loading Loading @@ -79,7 +79,7 @@ public class OtpErlangPort extends OtpErlangObject { * @param creation * another arbitrary number. Only the low order 2 bits will be used. */ public OtpErlangPort(final String node, final int id, final int creation) { public OtpErlangPort(final String node, final long id, final int creation) { this(OtpExternal.portTag, node, id, creation); } Loading @@ -100,7 +100,7 @@ public class OtpErlangPort extends OtpErlangObject { * @param creation * another arbitrary number. */ public OtpErlangPort(final int tag, final String node, final int id, public OtpErlangPort(final int tag, final String node, final long id, final int creation) { this.node = node; if (tag == OtpExternal.portTag) { Loading @@ -122,7 +122,7 @@ public class OtpErlangPort extends OtpErlangObject { * * @return the id number from the port. */ public int id() { public long id() { return id; } Loading Loading @@ -191,7 +191,8 @@ public class OtpErlangPort extends OtpErlangObject { protected int doHashCode() { final OtpErlangObject.Hash hash = new OtpErlangObject.Hash(6); hash.combine(creation); hash.combine(id, node.hashCode()); hash.combine(id); hash.combine(node.hashCode()); return hash.valueOf(); } } java_src/com/ericsson/otp/erlang/OtpErlangRef.java +35 −13 Original line number Diff line number Diff line Loading @@ -136,15 +136,20 @@ public class OtpErlangRef extends OtpErlangObject { final int creation) { this.node = node; // use at most 3 words // use at most 5 words int len = ids.length; if (len < 3) { this.ids = new int[3]; this.ids[0] = 0; this.ids[1] = 0; this.ids[2] = 0; if (len > 3) { len = 3; } else if (len <= 5) { this.ids = new int[len]; } else { this.ids = new int[5]; len = 5; } System.arraycopy(ids, 0, this.ids, 0, len); if (tag == OtpExternal.newRefTag) { Loading Loading @@ -173,7 +178,7 @@ public class OtpErlangRef extends OtpErlangObject { /** * Get the array of id numbers from the ref. If this is an old style ref, * the array is of length 1. If this is a new style ref, the array has * length 3. * length 3-5. * * @return the array of id numbers from the ref. */ Loading Loading @@ -260,11 +265,28 @@ public class OtpErlangRef extends OtpErlangObject { return false; } if (isNewRef() && ref.isNewRef()) { return ids[0] == ref.ids[0] && ids[1] == ref.ids[1] && ids[2] == ref.ids[2]; if (ids.length != ref.ids.length) { if (ids.length > ref.ids.length) { for (int i = ref.ids.length; i < ids.length; i++) { if (ids[i] != 0) { return false; } } } else { for (int i = ids.length; i < ref.ids.length; i++) { if (ref.ids[i] != 0) { return false; } } } } for (int i = 0; i < ids.length; i++) { if (ids[i] != ref.ids[i]) { return false; } } return ids[0] == ref.ids[0]; return true; } /** Loading Loading
README.md +1 −0 Original line number Diff line number Diff line Loading @@ -7,6 +7,7 @@ Available versions: | JInterface | Erlang versions supported | |------------|---------------------------| | 1.12 | >=24, <24.1 | | 1.11.1 | >=23.3, <23.3.4.12 | | 1.11 | >=23, <23.3 | | 1.10.1 | >=22.1, <23 | Loading
java_src/com/ericsson/otp/erlang/AbstractNode.java +3 −1 Original line number Diff line number Diff line Loading @@ -95,6 +95,7 @@ public class AbstractNode implements OtpTransportFactory { static final int dFlagBigCreation = 0x40000; static final int dFlagHandshake23 = 0x1000000; static final int dFlagUnlinkId = 0x2000000; static final long dFlagV4PidsRefs = 0x4L << 32; int ntype = NTYPE_R6; int proto = 0; // tcp/ip Loading @@ -107,7 +108,8 @@ public class AbstractNode implements OtpTransportFactory { | dFlagExportPtrTag | dFlagBigCreation | dFlagHandshake23 | dFlagUnlinkId; | dFlagUnlinkId | dFlagV4PidsRefs; /* initialize hostname and default cookie */ static { Loading
java_src/com/ericsson/otp/erlang/OtpErlangExternalFun.java +3 −3 Original line number Diff line number Diff line Loading @@ -23,9 +23,9 @@ public class OtpErlangExternalFun extends OtpErlangObject { // don't change this! private static final long serialVersionUID = 6443965570641913886L; private final String module; private final String function; private final int arity; public final String module; public final String function; public final int arity; public OtpErlangExternalFun(final String module, final String function, final int arity) { Loading
java_src/com/ericsson/otp/erlang/OtpErlangPort.java +6 −5 Original line number Diff line number Diff line Loading @@ -27,7 +27,7 @@ public class OtpErlangPort extends OtpErlangObject { private static final long serialVersionUID = 4037115468007644704L; private final String node; private final int id; private final long id; private final int creation; /* Loading Loading @@ -79,7 +79,7 @@ public class OtpErlangPort extends OtpErlangObject { * @param creation * another arbitrary number. Only the low order 2 bits will be used. */ public OtpErlangPort(final String node, final int id, final int creation) { public OtpErlangPort(final String node, final long id, final int creation) { this(OtpExternal.portTag, node, id, creation); } Loading @@ -100,7 +100,7 @@ public class OtpErlangPort extends OtpErlangObject { * @param creation * another arbitrary number. */ public OtpErlangPort(final int tag, final String node, final int id, public OtpErlangPort(final int tag, final String node, final long id, final int creation) { this.node = node; if (tag == OtpExternal.portTag) { Loading @@ -122,7 +122,7 @@ public class OtpErlangPort extends OtpErlangObject { * * @return the id number from the port. */ public int id() { public long id() { return id; } Loading Loading @@ -191,7 +191,8 @@ public class OtpErlangPort extends OtpErlangObject { protected int doHashCode() { final OtpErlangObject.Hash hash = new OtpErlangObject.Hash(6); hash.combine(creation); hash.combine(id, node.hashCode()); hash.combine(id); hash.combine(node.hashCode()); return hash.valueOf(); } }
java_src/com/ericsson/otp/erlang/OtpErlangRef.java +35 −13 Original line number Diff line number Diff line Loading @@ -136,15 +136,20 @@ public class OtpErlangRef extends OtpErlangObject { final int creation) { this.node = node; // use at most 3 words // use at most 5 words int len = ids.length; if (len < 3) { this.ids = new int[3]; this.ids[0] = 0; this.ids[1] = 0; this.ids[2] = 0; if (len > 3) { len = 3; } else if (len <= 5) { this.ids = new int[len]; } else { this.ids = new int[5]; len = 5; } System.arraycopy(ids, 0, this.ids, 0, len); if (tag == OtpExternal.newRefTag) { Loading Loading @@ -173,7 +178,7 @@ public class OtpErlangRef extends OtpErlangObject { /** * Get the array of id numbers from the ref. If this is an old style ref, * the array is of length 1. If this is a new style ref, the array has * length 3. * length 3-5. * * @return the array of id numbers from the ref. */ Loading Loading @@ -260,11 +265,28 @@ public class OtpErlangRef extends OtpErlangObject { return false; } if (isNewRef() && ref.isNewRef()) { return ids[0] == ref.ids[0] && ids[1] == ref.ids[1] && ids[2] == ref.ids[2]; if (ids.length != ref.ids.length) { if (ids.length > ref.ids.length) { for (int i = ref.ids.length; i < ids.length; i++) { if (ids[i] != 0) { return false; } } } else { for (int i = ids.length; i < ref.ids.length; i++) { if (ref.ids[i] != 0) { return false; } } } } for (int i = 0; i < ids.length; i++) { if (ids[i] != ref.ids[i]) { return false; } } return ids[0] == ref.ids[0]; return true; } /** Loading