<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
p.ecxmsonormal, li.ecxmsonormal, div.ecxmsonormal
        {mso-style-name:ecxmsonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style><!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="blue" vlink="purple">
<div class="Section1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Have you got the stack trace, that may give a clue? Also what are the actual values of start date and end date?<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Thomas<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D"><o:p>&nbsp;</o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:
&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;
font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> rules-users-bounces@lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org]
<b>On Behalf Of </b>dhari<br>
<b>Sent:</b> 23 February 2010 11:30<br>
<b>To:</b> rules-users@lists.jboss.org<br>
<b>Subject:</b> Re: [rules-users] Comparing Date with || OR operator<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<p class="MsoNormal"><span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Hi Thomas</span><br>
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;</span><br>
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Thanks your prompt reply. I am sure all three attributes are NOT null. I have tested them before sending question to mailing list. If you want, I&nbsp;can send complete sample code and you can try
 it at your end.</span><br>
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">&nbsp;</span><br>
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Regards,</span><br>
<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;">Dhari</span><br>
<br>
&nbsp;<span style="font-size:10.0pt;font-family:&quot;Verdana&quot;,&quot;sans-serif&quot;"><o:p></o:p></span></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center" id="stopSpelling">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">Date: Tue, 23 Feb 2010 02:50:08 -0800<br>
From: <a href="http://n3.nabble.com/user/SendEmail.jtp?type=node&amp;node=383423&amp;i=0" target="_top">
[hidden email]</a><br>
To: <a href="http://n3.nabble.com/user/SendEmail.jtp?type=node&amp;node=383423&amp;i=1" target="_top">
[hidden email]</a><br>
Subject: Re: Comparing Date with || OR operator<o:p></o:p></p>
<div>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">If it works fine with an and operator then I’d imagine that startDate &lt; $regDate returns false, with an &amp;&amp; this would abort evaluation immediately but
 with an or it would mean that startDate &gt; endDate is evaluated and so presumably it is this bit that is throwing the NPE.&nbsp; I’d imagine that the most likely reason for this would be that endDate is null.</span><o:p></o:p></p>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Try changing it too
</span><o:p></o:p></p>
<pre>Segment ( startDate &lt; $regDate || (endDate != null &amp;&amp; startDate &gt; endDate) )<o:p></o:p></pre>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">And see whether you loose the NPE.</span><o:p></o:p></p>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">&nbsp;</span><o:p></o:p></p>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">Thomas</span><o:p></o:p></p>
<p class="ecxmsonormal"><span style="font-size:11.0pt;font-family:&quot;Calibri&quot;,&quot;sans-serif&quot;;
color:#1F497D">&nbsp;</span><o:p></o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="ecxmsonormal"><b><span lang="EN-US" style="font-size:10.0pt;font-family:
&quot;Tahoma&quot;,&quot;sans-serif&quot;">From:</span></b><span lang="EN-US" style="font-size:10.0pt;
font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;"> [hidden email] [mailto:[hidden email]]
<b>On Behalf Of </b>dhari<br>
<b>Sent:</b> 23 February 2010 06:15<br>
<b>To:</b> [hidden email]<br>
<b>Subject:</b> [rules-users] Comparing Date with || OR operator</span><o:p></o:p></p>
</div>
</div>
<p class="ecxmsonormal">&nbsp;<o:p></o:p></p>
<p class="ecxmsonormal">The following code generates NPE in ReteTuple.java <o:p></o:p></p>
<pre>rule <o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Membership ( $regDate : regDate)<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Segment ( startDate &lt; $regDate || startDate &gt; endDate )<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; then<o:p></o:p></pre>
<pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; System.err.print(“Invalid start date”);<o:p></o:p></pre>
<pre>end<o:p></o:p></pre>
<p class="ecxmsonormal">I am new in Drools and don’t know much about DRL scripting. It works fine I use &amp;&amp; operator instead.
<o:p></o:p></p>
<div>
<div class="MsoNormal">
<hr size="2" width="300" style="width:225.0pt" align="left">
</div>
</div>
<p class="ecxmsonormal">View this message in context: Comparing Date with || OR operator<br>
Sent from the Drools - User mailing list archive at Nabble.com.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p>&nbsp;</o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:7.5pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:gray"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the [hidden email] and delete it from your system as well as any copies. The content of e-mails as well as traffic data may
 be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************</span><o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:7.5pt;
font-family:&quot;Arial&quot;,&quot;sans-serif&quot;;color:gray">This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify
 the [hidden email] and delete it from your system as well as any copies. The content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.<br>
To protect the environment please do not print this e-mail unless necessary.<br>
<br>
An NDS Group Limited company. www.nds.com<br>
</span><br>
_______________________________________________ <br>
rules-users mailing list <br>
[hidden email] <br>
https://lists.jboss.org/mailman/listinfo/rules-users<br>
<br>
<o:p></o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="1" width="100%" noshade="" style="color:#CCCCCC" align="center">
</div>
<div>
<p class="MsoNormal"><span style="font-size:8.5pt;font-family:&quot;Tahoma&quot;,&quot;sans-serif&quot;;
color:#666666">View message @ http://n3.nabble.com/Comparing-Date-with-OR-operator-tp347656p379447.html
<br>
To unsubscribe from Drools - Java Rules Engine, click here. <o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><o:p>&nbsp;</o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<p class="MsoNormal">Find your next place with Ninemsn&nbsp;property <a href="http://clk.atdmt.com/NMN/go/157631292/direct/01/" target="_new">
Looking for a place to rent, share or buy?</a> <o:p></o:p></p>
<div class="MsoNormal">
<hr size="2" width="300" style="width:225.0pt" align="left">
</div>
<p class="MsoNormal">View this message in context: <a href="http://n3.nabble.com/Comparing-Date-with-OR-operator-tp347656p383423.html">
RE: Comparing Date with || OR operator</a><br>
Sent from the <a href="http://n3.nabble.com/Drools-User-f47000.html">Drools - User mailing list archive</a> at Nabble.com.<o:p></o:p></p>
</div>
</div>
<br>
<hr>
<font face="Arial" color="Gray" size="1"><br>
**************************************************************************************<br>
This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The content of e-mails as well as traffic data
 may be monitored by NDS for employment and security purposes. To protect the environment please do not print this e-mail unless necessary.<br>
<br>
NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 4EX, United Kingdom. A company registered in England and Wales. Registered no. 3080780. VAT no. GB 603 8808 40-00<br>
**************************************************************************************<br>
</font><br>
<hr>
<font face="Arial" color="Gray" size="1">This message is confidential and intended only for the addressee. If you have received this message in error, please immediately notify the postmaster@nds.com and delete it from your system as well as any copies. The
 content of e-mails as well as traffic data may be monitored by NDS for employment and security purposes.<br>
To protect the environment please do not print this e-mail unless necessary.<br>
<br>
An NDS Group Limited company. www.nds.com<br>
</font>
</body>
</html>