[erlang-questions] JInterface empty string issue

Erik Reitsma <>
Tue Sep 23 15:02:28 CEST 2008

Hi all,

We are sending strings (in tuples and otherwise) from Erlang to Java
(receiving them with JInterface). If the string is non-empty, we receive
an OtpErlangString in Java. But if the string is empty, the empty list
(nil) is sent, which becomes an OtpErlangList. This means that we cannot
"blindly" cast the incoming message (or tuple element) to an
OtpErlangString, but we must always check if it is the empty list.
I believe this issue could be solved by making OtpErlangString extend
OtpErlangList and implementing the OtpErlangList methods in

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20080923/7f03fce5/attachment.htm>

More information about the erlang-questions mailing list