Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-219

Byteman fails to typecheck calls to interface methods in the rule body

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • 2.1.1
    • 2.1.0
    • Parser/Type Checker
    • None

    Description

      If a call to an interface method is included in a rule body Byteman may fail to type check it correctly, notifying an invalid method error (it probably should say unknown method but anyway ...). This only happens in a specific case where the class which implements the interface is abstract and so does not actually include an implementation method.

      As an example, assume

      interface I

      { public void foo(); }

      abstract class Foo implements I { public void test()

      { ... } }

      class Bar extends Foo { public void foo() { ... }

      }

      and then let the rule be

      RULE bad method check
      CLASS Foo
      METHOD test
      IF TRUE
      DO $0.foo()
      ENDRULE

      Method foo is only looked for via classes Foo and Object. Since neither of them implements foo() the lookup fails. However, foo() should also be searched for via interface I (and then also executed via the Method instance defined by that interface).

      Attachments

        Activity

          People

            rhn-engineering-adinn Andrew Dinn
            rhn-engineering-adinn Andrew Dinn
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: