Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-1109

XWikiRightServiceImpl.listAllLevels uses an expensive method for producing the rights list.

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Minor
    • 1.0 RC4
    • 1.0 RC1
    • {Unused} Core
    • None
    • performance, XWikiRightServiceImpl, listAllLevels, patch

    Description

      XWikiRightServiceImpl.listAllLevels uses a costly method for producing a constant result.
      Indeed it splits a string and build the list of rights each time it is called.

      This could be improved by generating a static list once for all.

      See attached patch.

      btw,
      In the attached patch I have used a 1.4 compatible syntax but
      jdk 1.5 allows us the slightly more elegant construct:
      Arrays.asList("admin","view","edit","comment","delete","register","programming");

      Attachments

        Activity

          People

            sdumitriu Sergiu Dumitriu
            oliveira Pablo Oliveira
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: