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

DRS ruleset path matching problem

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8u20
    • Component/s: deploy
    • Labels:
      None
    • Resolved In Build:
      b12

      Backports

        Description

        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/

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  Created:
                  Updated:
                  Resolved: