<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1589" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=285305216-15032007>We 
handle it as it can't be anything else but null cause null is returned when an 
access fails or some error occurs. This keeps it from falling into a valid 
evaluation and possibly a subtle bug going uncaught.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=285305216-15032007></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=285305216-15032007>Tom 
G</SPAN></FONT></DIV><BR>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> rules-dev-bounces@lists.jboss.org 
[mailto:rules-dev-bounces@lists.jboss.org] <B>On Behalf Of </B>Mark 
Proctor<BR><B>Sent:</B> Thursday, March 15, 2007 12:42 PM<BR><B>To:</B> Rules 
Dev List<BR><B>Subject:</B> Re: [rules-dev] need advice re null 
handling<BR></FONT><BR></DIV>
<DIV></DIV>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 content="MSHTML 6.00.2800.1589" name=GENERATOR>
  <DIV><SPAN class=025450516-15032007><FONT face=Arial color=#0000ff 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 face=Arial color=#0000ff size=2>Tom 
  G</FONT></SPAN></DIV><BR>
  <DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
  <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 width="90%" SIZE=4>
_______________________________________________
rules-dev mailing list
<A class=moz-txt-link-abbreviated href="mailto:rules-dev@lists.jboss.org" moz-do-not-send="true">rules-dev@lists.jboss.org</A>
<A class=moz-txt-link-freetext href="https://lists.jboss.org/mailman/listinfo/rules-dev" moz-do-not-send="true">https://lists.jboss.org/mailman/listinfo/rules-dev</A>
  </PRE></BLOCKQUOTE><BR><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
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>