<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; ">Thanks Edson. I'll get the last build from trunk... I'm working on an idea for a testing framework I commented<DIV>to Michael Neale some time ago and needed that...</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>:)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR><DIV><DIV>On 24-07-2007, at 15:55, Edson Tirelli wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><BR>   Felipe,<BR><BR>   The NPE is a bug that was fixed already.<BR>   I can't think in another way of doing without using a return value restriction as you are doing... <BR><BR>   []s<BR>   Edson<BR><BR><DIV><SPAN class="gmail_quote"> 2007/7/24, Felipe Piccolini &lt;<A href="mailto:felipe.piccolini@bluesoft.cl">felipe.piccolini@bluesoft.cl</A>&gt;:</SPAN><BLOCKQUOTE class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> <DIV style="">Hi,<DIV><BR></DIV><DIV>   Im trying to compare a field to a Class type but when parsing I get NPE and when I debug,</DIV><DIV>the constraint is a ReturnValueConstraint but the <FONT color="#0000c0" face="Monaco" size="3"> <SPAN style="font-size: 11px;">restriction</SPAN></FONT><FONT face="Monaco" size="3"><SPAN style="font-size: 11px;">.getRequiredDeclarations()</SPAN></FONT> </DIV><DIV>return a Declaration[] array initializated, but empty, so I can't get the declaration evaluated...  </DIV><DIV>I needed because I'm working on a kind of parser for the rules for analisys and testing... but using </DIV><DIV>the already parsed package.</DIV><DIV><BR></DIV><DIV>Here is a pseudo rule for test...</DIV><DIV> <BR></DIV><DIV style="margin: 0px;"><FONT color="#960000" face="Monaco" size="3"><SPAN style="font-size: 11px;">rule</SPAN></FONT><FONT face="Monaco" size="3"><SPAN style="font-size: 11px;"> </SPAN></FONT><FONT color="#008000" face="Monaco" size="3"> <SPAN style="font-size: 11px;">"Test A"</SPAN></FONT></DIV><DIV style="margin: 0px;"><SPAN style="white-space: pre;">        </SPAN><FONT color="#960000" face="Monaco" size="3"><SPAN style="font-size: 11px;">when</SPAN> </FONT></DIV><DIV style="margin: 0px;"><SPAN style="white-space: pre;">        </SPAN><SPAN style="white-space: pre;">        </SPAN><FONT face="Monaco" size="3"><SPAN style="font-size: 11px;">$mf: MyFact(clazz == (SomeClass.class))</SPAN> </FONT></DIV><DIV style="margin: 0px;"><SPAN style="white-space: pre;">        </SPAN><FONT color="#960000" face="Monaco" size="3"><SPAN style="font-size: 11px;">then</SPAN></FONT></DIV><DIV style="margin: 0px;"><SPAN style="white-space: pre;">         </SPAN><SPAN style="white-space: pre;">        </SPAN><FONT face="Monaco" size="3"><SPAN style="font-size: 11px;">System.out.println(</SPAN></FONT><FONT color="#008000" face="Monaco" size="3"><SPAN style="font-size: 11px;">"Test A: OK" </SPAN></FONT><FONT face="Monaco" size="3"><SPAN style="font-size: 11px;">);</SPAN></FONT></DIV><DIV style="margin: 0px;"><FONT color="#960000" face="Monaco" size="3"><SPAN style="font-size: 11px;">end</SPAN></FONT></DIV> <DIV><BR></DIV><DIV>Actualy, the rule compiles (with the NPE output, not stackTrace, just the <FONT color="#000080" face="Monaco" size="3"><SPAN style="font-size: 11px; text-decoration: underline;">java.lang.NullPointerException </SPAN></FONT>, </DIV><DIV>and it works fine.. I mean I get "Test A: OK" as output, but cant get the SomeClass.class reference when I</DIV><DIV>look into the debugger.</DIV><DIV><BR></DIV><DIV>Is this the right way to compare clases? if not, whats the right way? (Im trying to not do == "SomeClass") </DIV><DIV><DIV><DIV> <SPAN style="border-collapse: separate; border-spacing: 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;"> <DIV><SPAN style="text-decoration: underline;"><SPAN>                                                                        </SPAN></SPAN><DIV><FONT size="3"><SPAN style="font-size: 13px;"><B style="font-size: 13px; font-weight: bold;"> <SPAN style="font-size: 13px; font-weight: bold;">Felipe Piccolini M.</SPAN></B></SPAN></FONT></DIV><DIV><A href="mailto:felipe.piccolini@bluesoft.cl" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> <SPAN style="color: rgb(0, 0, 238);">felipe.piccolini@bluesoft.cl</SPAN></A></DIV><BR></DIV><DIV><BR></DIV><BR></SPAN> </DIV><BR></DIV></DIV></DIV><BR>_______________________________________________<BR>rules-dev mailing list <BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A><BR><A onclick="return top.js.OpenExtLink(window,event,this)" href="https://lists.jboss.org/mailman/listinfo/rules-dev" target="_blank"> https://lists.jboss.org/mailman/listinfo/rules-dev</A><BR><BR></BLOCKQUOTE></DIV><BR><BR clear="all"><BR>-- <BR>  Edson Tirelli<BR>  Software Engineer - JBoss Rules Core Developer<BR>  Office: +55 11 3529-6000<BR>  Mobile: +55 11 9287-5646 <BR>  JBoss, a division of Red Hat @ <A href="http://www.jboss.com">www.jboss.com</A><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_______________________________________________</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">rules-dev mailing list</DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="mailto:rules-dev@lists.jboss.org">rules-dev@lists.jboss.org</A></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><A href="https://lists.jboss.org/mailman/listinfo/rules-dev">https://lists.jboss.org/mailman/listinfo/rules-dev</A></DIV> </BLOCKQUOTE></DIV><BR><DIV> <SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><BR class="Apple-interchange-newline"><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Arial" size="4"><SPAN class="Apple-style-span" style="font-size: 13.3px;; font-family: Arial; "><BR class="khtml-block-placeholder"></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Arial" size="4"><SPAN class="Apple-style-span" style="font-size: 13.3px;; font-family: Arial; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; ">Atentamente,</SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Arial" size="4"><SPAN class="Apple-style-span" style="font-size: 13.3px;; font-family: Arial; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; "><SPAN class="Apple-style-span" style="font-family: Arial; font-size: 13.3px; ">______________________</SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><B style="font-family: Times New Roman; font-size: 16px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; font-weight: bold; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; font-weight: bold; ">Felipe Piccolini Marfull</SPAN></SPAN></SPAN></SPAN></B></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; ">Jefe de Proyectos</SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; ">Agustina 1141 Piso 8-B</SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; ">Santiago</SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "> </SPAN></SPAN></SPAN></SPAN></SPAN></FONT></P><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; ">Fono    +(56 2) 6883083</SPAN></SPAN></SPAN><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; ">7</SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV><DIV style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; "><SPAN class="Apple-style-span" style="font-family: Times New Roman; font-size: 16px; ">E-mail </SPAN></SPAN></SPAN><FONT class="Apple-style-span" color="#0022F2"><SPAN class="Apple-style-span" style="text-decoration: underline;; color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; ">felipe.piccolini</SPAN></SPAN></SPAN></SPAN></FONT></SPAN></SPAN></FONT><A href="mailto:richard.calderon@bluesoft.cl"><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; color: rgb(0, 0, 238); font-family: Times New Roman; -khtml-text-decorations-in-effect: underline; "><FONT class="Apple-style-span" color="#0022F2"><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; "><SPAN class="Apple-style-span" style="color: rgb(0, 34, 242); font-family: Times New Roman; font-size: 16px; -khtml-text-decorations-in-effect: underline; ">@bluesoft.cl</SPAN></SPAN></SPAN></SPAN></FONT></SPAN></FONT></A></DIV><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT class="Apple-style-span" face="Times New Roman" size="4"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "><BR class="khtml-block-placeholder"></SPAN></FONT></P><BR class="Apple-interchange-newline"></SPAN><SPAN><IMG src="cid:C7BC1E79-081E-4FF6-ACBF-A13DA26844DF@local"></SPAN><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT class="Apple-style-span" face="Times New Roman" size="4"><BR class="Apple-interchange-newline"><SPAN class="Apple-style-span" style="font-size: 16px;; font-family: Times New Roman; "></SPAN></FONT></P></SPAN></SPAN></SPAN></SPAN><BR class="Apple-interchange-newline"></SPAN> </SPAN></SPAN></SPAN></SPAN></DIV><BR></DIV></BODY></HTML>