Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-10388

RepoPath.getParent returns null for top-level paths

    XMLWordPrintableJSON

Details

    Description

      kpauls, as discussed it seem there exists one (or potentially many) bugs in the RepoPath class as new RepoPath("/apps").getParent() returns null, which IMHO is unexpected.

      more things i noticed while trying to understand what's going on:

      • toString for a repository path is "/" and not ""
      • equals method ignores isRepositoryPath field
      • getSegmentCount is not used at all
      • however, getSegments does not exist (but would be better in DefaultAclManager.getCreatePath than the split/substring on the toString method)
      • startswith(null(: comment states that the root path is null which is not what the code does in the constructor.... startswith(null) should IMO return false

      Attachments

        Issue Links

          Activity

            People

              angela Angela Schreiber
              angela Angela Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: