jinterface: can't use 0-length tuples

Vlad Dumitrescu vlad_dumitrescu@REDACTED
Sat Feb 4 10:12:10 CET 2006


Hi!

In jinterface 1.3 tuples with zero length can't be created or used. Unless there's a reason for that, I think they should be supported just like in Erlang :-)

The fix is very simple:

    public OtpErlangTuple(OtpErlangObject[] elems, int start, int count)
    {
-        if ((elems == null) || (count < 1))
+        if (elems == null)
        {
            throw new java.lang.IllegalArgumentException("Cannot make an empty tuple");

best regards,
Vlad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20060204/8d963737/attachment.htm>


More information about the erlang-bugs mailing list