Uploaded image for project: 'Migration Toolkit for Applications'
  1. Migration Toolkit for Applications
  2. MTA-5763

Rules with METHOD_CALL locations do not work on calls to static methods

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Downstream bug of https://github.com/konveyor/analyzer-lsp/issues/769

      Description of problem:

      This condition in a rule:

        when:
          java.referenced:
            location: METHOD_CALL
            pattern: org.jboss.logging.Logger.getLogger(*)

       
      Should trigger an incident in the following code (extracted from tackle-testapp)

      private static Logger logger = Logger.getLogger( CustomerService.class.getName() );

       
      But it doesn't trigger any incidents.  

      How reproducible: Always

       

      Steps to Reproduce:
      1. Create a custom rule with the condition specified above
      2. Perform an analysis in the tackle-testeapp app using mta-cli

      Actual results:

       The rule doesn't trigger any issues

      Expected results:

      The rule should trigger an incident in the following code (extracted from tackle-testapp)

      private static Logger logger = Logger.getLogger( CustomerService.class.getName() );

       

       

              jleflete@redhat.com Juanma Leflet Estrada
              rh-ee-abrugaro Alejandro Brugarolas
              Alejandro Brugarolas Alejandro Brugarolas
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: