Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8041128

DRS ruleset path matching problem

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 8u20
    • None
    • deploy
    • None
    • b12

        If a DRS rule uses a location based rule for a directory such as:
        http://foo.com/dir1/dir2
        it will match an artifact in a different directory such as:
        http://foo.com/dir1/dir20/app.jnlp
        due to the code in at end of RuleId.pathIncludes():
                if (rulePath == null || rulePath.length() == 0 ||
                        artifactPath.startsWith(rulePath)) {
                    pathMatch = true;
                } else {
                   Trace.println("Path mistach, actualPath: " + artifactPath,
                           TraceLevel.RULESET);
                }
                return pathMatch;
        This is not the case if the location in the DRS includes the trailing slash:
        http://foo.com/dir1/dir2/

              herrick Andy Herrick (Inactive)
              herrick Andy Herrick (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: