Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
1.0 RC1
-
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");