-
Bug
-
Resolution: Unresolved
-
Normal
-
MTA 7.3.1
-
None
-
Quality / Stability / Reliability
-
False
-
-
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.
- is related to
-
MTA-5905 Clarify "pattern" input parameter in documentation
-
- New
-