<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Its not about giving it up, its how we handle when those fields are
null, do we treat it like a primitive and assume its 0, or do we say it
can't be equal to anything else but null.<br>
<br>
In the following example neither y or z is defined, thus y is null and
z is 0;<br>
<br>
int x = 0;<br>
Integer y;<br>
in z;<br>
x == y // is false;<br>
x == z // is true<br>
y == null // is true<br>
<br>
Mark<br>
<br>
Tom Gonzalez wrote:
<blockquote
 cite="mid:25E284CCA9C9A14B89515B116139A94D108F3A88@zrtphxm0.corp.nortel.com"
 type="cite">
  <meta http-equiv="Content-Type" content="text/html; ">
  <meta content="MSHTML 6.00.2800.1589" name="GENERATOR">
  <div><span class="025450516-15032007"><font color="#0000ff"
 face="Arial" size="2">The flexibility provided by an Object is very
valuable. We use Integer and String objects all over the place today in
our&nbsp;facts&nbsp;with drools. I would hate to give it up.</font></span></div>
  <div><span class="025450516-15032007"></span>&nbsp;</div>
  <div><span class="025450516-15032007"><font color="#0000ff"
 face="Arial" size="2">Tom G</font></span></div>
  <br>
  <div class="OutlookMessageHeader" dir="ltr" align="left" lang="en-us">
  <hr tabindex="-1"><font face="Tahoma" size="2"><b>From:</b>
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev-bounces@lists.jboss.org">rules-dev-bounces@lists.jboss.org</a>
[<a class="moz-txt-link-freetext" href="mailto:rules-dev-bounces@lists.jboss.org">mailto:rules-dev-bounces@lists.jboss.org</a>] <b>On Behalf Of </b>Mark
Proctor<br>
  <b>Sent:</b> Thursday, March 15, 2007 6:29 AM<br>
  <b>To:</b> Rules Dev List<br>
  <b>Subject:</b> Re: [rules-dev] need advice re null handling<br>
  </font><br>
  </div>
if bar is an integer it will be 0, if its an Integer it will be null.
The Q is do we make Integer work like the primitive, or do we make it
work like an Object.<br>
  <br>
Mark<br>
Michael Neale wrote:
  <blockquote
 cite="mid:96ab3ced0703142259q513d3170je37fbebc89040975@mail.gmail.com"
 type="cite"><a href="http://jira.jboss.com/jira/browse/JBRULES-627"
 moz-do-not-send="true">http://jira.jboss.com/jira/browse/JBRULES-627</a><br>
    <br>
OK, this much is clear: <br>
    <br>
Foo(field == null) can be true if field is null.<br>
    <br>
but, what about Foo(field &gt; 3), and field is null? should that be
false? what about Foo(field != 3) - should that be true? <br>
    <br>
in SQL, null will always result in a false condition, unless you
explicitly use null.<br>
    <br>
Thoughts? <br>
    <br>
Michael.<br>
    <pre wrap=""><hr size="4" width="90%">
_______________________________________________
rules-dev mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated"
 href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext"
 href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
  </pre>
  </blockquote>
  <br>
  <pre wrap="">
<hr size="4" width="90%">
_______________________________________________
rules-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</a>
  </pre>
</blockquote>
<br>
</body>
</html>