On 27 October 2011 10:41, Mario Leyton <span dir="ltr">&lt;<a href="mailto:mleyton@niclabs.cl">mleyton@niclabs.cl</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    
    We are using rabbitmq java client and I believe the following is a
    bug:<br></div></blockquote><div><br>Nope, it&#39;s deliberate. null, here, represents that no headers were sent. This is distinct from an empty map being sent. AMQP&#39;s basic properties structure includes &quot;absent/present&quot; bits for all of the fields; we chose to use &quot;null&quot; to represent &quot;missing&quot;, as in this instance it is unambiguous. In languages like ML and Haskell we&#39;d use &#39;whatever option and Maybe whatever, respectively. In C, we use a bitmap stored separately from the struct members concerned.<br>
<br>So when reading (or writing!) basic properties in Java,<br><ul><li>null means &quot;missing value&quot; or &quot;no value&quot;</li><li>empty map, empty string etc. is a <i>present</i> value but is otherwise just itself</li>
<li>non-empty maps, strings, etc are present values<br></li></ul>Regards,<br>� Tony<br><br></div></div>