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

Clarify "pattern" input parameter in documentation to mention the "(...|...)" special case

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • MTA 8.0.1
    • MTA 7.3.1
    • Documentation
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False
    • None

      Description of problem:

      The Java Locations section of the "Rules Development Guide" contains the following description about the "pattern" input parameter:

      More information about the possibilities of these patterns can be found in the official Java documentaion, which contain all the information for building these patterns in the createPattern(String, int, int, int) section.

      However, this description does not mention the "(...|...)" special use case.

      For example, the 130-weblogic-ejb.windup.yaml rule contains the following:

      when:
        java.referenced:
          location: IMPORT
          pattern: weblogic.(ejb|ejb20|ejbgen)?*
      

      It looks like the java-analyzer-bundle will check for the existence of "(...|...)" in the pattern and then split the pattern into multiple patterns which will be passed to createOrPattern().

      In the case of weblogic.(ejb|ejb20|ejbgen)?, it looks like java-analyzer-bundle will split that into "weblogic.", "weblogic.ejb*", "weblogic.ejb20*", "weblogic.ejbgen*" patterns that will then be ORed together.

      The documentation should mention that "(...|...)" can be used to OR multiple search terms together.

              rhn-support-anarnold A Arnold
              rhn-support-iwalker Ian Walker
              Ilanit Stein Ilanit Stein
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: