[ https://issues.apache.org/jira/browse/SLING-1871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Felix Meschberger resolved SLING-1871. -------------------------------------- Resolution: Fixed Assignee: Felix Meschberger Rev. 1033507: Use a ConcurrentHashMap to store the resources to make access thread safe. In addition synchronize on the JcrResourceBundle instance when doing the full load to prevent excess load on the system. Finally implement the Java 6 handleKeySet() method to just return the key set view of the fully loaded resources. > JcrResourceBundle.loadFully not thread safe > ------------------------------------------- > > Key: SLING-1871 > URL: https://issues.apache.org/jira/browse/SLING-1871 > Project: Sling > Issue Type: Improvement > Components: Extensions > Reporter: Felix Meschberger > Assignee: Felix Meschberger > > The JcrResourceBundle.loadFully method is intended to ensure the resource > bundle is fully loaded (used by the getKeys() method). > This method is not currently thread safe in that it writes into the resources > (cache) map unsynchronized which may cause map corruption and thus endless > loops. > While fixing this method, we should also overwrite the Java 1.6 > ResourceBundle method handleKeySet() which is used by the new keySet() > method. The default implementation creates its own cache of keys, which > duplicates the resource properties map of the JcrResourceBundle class. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.