<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">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 )<br>
      <br>
      <br>
      On 04/18/2013 10:19 AM, Sean Su wrote:<br>
    </div>
    <blockquote
cite="mid:CA+tN6x8+2cYK8N95BDYp-MFj9yDO-+rdt_bDM6FMAtLFkeF9MA@mail.gmail.com"
      type="cite">
      <div dir="ltr">I am using 5.5.0.Final and I think I may have run
        into a bug.
        <div><br>
        </div>
        <div style="">Assuming I have a class Foo &nbsp;that has a getter
          which is getMyEnum().</div>
        <div style=""><br>
        </div>
        <div style="">Also I have a Enum class which happens to have the
          name MyEnum.</div>
        <div style=""><br>
        </div>
        <div style="">When writing rules, I have&nbsp;</div>
        <div style=""><br>
        </div>
        <div style="">$foo : Foo (MyEnum == MyEnum.someItem)</div>
        <div style=""><br>
        </div>
        <div style="">This line will throw NullPointerException.&nbsp;</div>
        <div style=""><br>
        </div>
        <div style="">I have to write it as:</div>
        <div style="">
          <div>$foo : Foo (getMyEnum() == MyEnum.someItem)</div>
          <div><br>
          </div>
          <div style="">This statement will work just fine.</div>
          <div style=""><br>
          </div>
          <div style="">
            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 style=""><br>
          </div>
          <div style="">Has anyone ever ran into this before.</div>
          <div style=""><br>
          </div>
          <div style="">Thanks</div>
          <div style=""><br>
          </div>
          <div style="">Sean</div>
          <div><br>
          </div>
          <div><br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
rules-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a>
<a class="moz-txt-link-freetext" href="https://lists.jboss.org/mailman/listinfo/rules-users">https://lists.jboss.org/mailman/listinfo/rules-users</a></pre>
    </blockquote>
    <br>
  </body>
</html>