<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7653.38">
<TITLE>JInterface empty string issue</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi all,</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">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.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">I believe this issue could be solved by making OtpErlangString extend OtpErlangList and implementing the OtpErlangList methods in OtpErlangString.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Regards,</FONT>
<BR><FONT SIZE=2 FACE="Arial">*Erik.</FONT>
</P>
</BODY>
</HTML>