Felipe,
The NPE is a bug that was fixed already.
I can't think in another way of doing without using a return value restriction as you are doing...
[]s
Edson2007/7/24, Felipe Piccolini <felipe.piccolini@bluesoft.cl>:Hi,Im trying to compare a field to a Class type but when parsing I get NPE and when I debug,the constraint is a ReturnValueConstraint but the restriction.getRequiredDeclarations()return a Declaration[] array initializated, but empty, so I can't get the declaration evaluated...I needed because I'm working on a kind of parser for the rules for analisys and testing... but usingthe already parsed package.Here is a pseudo rule for test...rule "Test A"when$mf: MyFact(clazz == (SomeClass.class))thenSystem.out.println("Test A: OK" );endActualy, the rule compiles (with the NPE output, not stackTrace, just the java.lang.NullPointerException ,and it works fine.. I mean I get "Test A: OK" as output, but cant get the SomeClass.class reference when Ilook into the debugger.Is this the right way to compare clases? if not, whats the right way? (Im trying to not do == "SomeClass")
_______________________________________________
rules-dev mailing list
rules-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-dev
--
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com_______________________________________________rules-dev mailing list