Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-61

Classes with package protected visibility cannot be used in rules defined in the same package

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 5.5.1.Final, 6.0.0.Alpha9
    • None
    • None
    • None

      The following two files (foo/Foo.java, foo/foo.drl) are sufficient to
      reproduce the bug, i.e., a diagnostic
      Exception in thread "main" [Error: could not access field: foo.Foo.x]
      [Near :

      {... x == 1 ....}

      ]

      package foo;
      /*** not public ***/ class Foo {
          private int x = 1;
          public int getX(){ return x; }
      }
      
      package foo;
      rule "foo getX"
      when
          Foo( x == 1 )
      then
          System.out.println( "some Foo.x == 1" );
      end
      

            mfusco@redhat.com Mario Fusco
            mfusco@redhat.com Mario Fusco
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: