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

AclLine.getRestrictions should not return null

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Repoinit Parser 1.3.2
    • Repoinit
    • None

    Description

      while trying to add nullable/notnull annotations in sling-jcr-repoinit to improve overall readability and maintainability of the code base, i noticed that AclLine.getRestrictions may return null. I would recommend to change this to be consistent with AclLine.getProperty, which returns an empty list in case no values exist for a given property name.

      Proposed patch attached (including replacing a private static final EMPTY_LIST field by Collections.emptyList, which afaik is also defined to be immutable.

      Attachments

        1. SLING-8798.patch
          1 kB
          Angela Schreiber

        Activity

          People

            rombert Robert Munteanu
            angela Angela Schreiber
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: