<div dir="ltr">Yes, I was in the middle of writing a clarification email.<div><br></div><div>The DSL side would be fine if I change it to myEnum (to follow the bean standard).</div><div><br></div><div style>Yes, Guvnor side did not change it to lower case. Note, I actually have my Enum as MYEnum (more than one upper case). Guvnor translated the getMYEnum to MYEnum as the bean property, which seems to be a bug.</div>
<div style><br></div><div style>Thanks</div><div style><br></div><div style>Sean</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Apr 18, 2013 at 1:28 PM, Davide Sottara <span dir="ltr"><<a href="mailto:dsotty@gmail.com" target="_blank">dsotty@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Thanks, it deserves investigation.
There seems to be at least a bug in Guvnor -<br>
it should create a constraint such as :<br>
<br>
Foo( myEnum == MyEnum.someitem )<div><div class="h5"><br>
<br>
<br>
On 04/18/2013 10:19 AM, Sean Su wrote:<br>
</div></div></div>
<blockquote type="cite"><div><div class="h5">
<div dir="ltr">I am using 5.5.0.Final and I think I may have run
into a bug.
<div><br>
</div>
<div>Assuming I have a class Foo that has a getter
which is getMyEnum().</div>
<div><br>
</div>
<div>Also I have a Enum class which happens to have the
name MyEnum.</div>
<div><br>
</div>
<div>When writing rules, I have </div>
<div><br>
</div>
<div>$foo : Foo (MyEnum == MyEnum.someItem)</div>
<div><br>
</div>
<div>This line will throw NullPointerException. </div>
<div><br>
</div>
<div>I have to write it as:</div>
<div>
<div>$foo : Foo (getMyEnum() == MyEnum.someItem)</div>
<div><br>
</div>
<div>This statement will work just fine.</div>
<div><br>
</div>
<div>
The workaround is ok for DRL. However I tested this on
Guvnor and the rule editor would generate the DRL just like
the first statement (MyEnum == MyEnum.someItem). So we would
be out of luck there.</div>
<div><br>
</div>
<div>Has anyone ever ran into this before.</div>
<div><br>
</div>
<div>Thanks</div>
<div><br>
</div>
<div>Sean</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div></div><pre>_______________________________________________
rules-users mailing list
<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br></div>