Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3118

Parser: import of class with "enum" in the FQN fails to parse

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • 5.2.1.Final, 5.3.0.Beta1
    • 5.2.0.Final
    • None
    • None

      The following DRL fails to compile, with error "Syntax error on token "enum", Identifier expected."

      package com.sample

      import com.sample.DroolsTest.Message;

      //The "enum" sub-package causes the problem, not "Enum" class
      import org.apache.commons.lang.enum.Enum

      rule "Hello World"
      when
      m : Message( status == Message.HELLO, myMessage : message )
      then
      System.out.println( myMessage );
      m.setMessage( "Goodbye cruel world" );
      m.setStatus( Message.GOODBYE );
      update( m );
      end

      rule "GoodBye"
      when
      Message( status == Message.GOODBYE, myMessage : message )
      then
      System.out.println( myMessage );
      end

            etirelli@redhat.com Edson Tirelli
            manstis@redhat.com Michael Anstis
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived: