Closed javaserverfaces closed 11 years ago
Reported by zsb
@manfredriem said: Resetting priority pending triage
@manfredriem said: Applied to 2.1 branch,
svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2926, r=rogerk, make sure the MultiKeyConcurrentHashMap compares the passed in keys correctly" Sending jsf-ri\src\main\java\com\sun\faces\util\MultiKeyConcurrentHashMap.java Transmitting file data . Committed revision 12085.
@manfredriem said: Applied to 2.2 branch,
svn commit -m "Fixes https://java.net/jira/browse/JAVASERVERFACES-2926, r=rogerk, make sure the MultiKeyConcurrentHashMap compares the passed in keys correctly" Sending jsf-ri\src\main\java\com\sun\faces\util\MultiKeyConcurrentHashMap.java Transmitting file data . Committed revision 12087.
File: changebundle.txt Attached By: @manfredriem
This issue was imported from java.net JIRA JAVASERVERFACES-2926
Marked as fixed on Thursday, July 11th 2013, 8:32:53 am
ResourceManager uses MultiKeyConcurrentHashMap inside to cache ResourceInfo. Many times it fills key4 with a Collections.emptyList() (when viewroot is available but there are no con parameter in the incoming request as much as I understand).
When key4 is not null MultiKeyConcurrentHashMap does not work well. Reason is in MultiKeyConcurrentHashMap$Segment.get() function:
if ((e.hash == hash && key1.equals(e.key1)) && ((key2 == null && e.key2 == null) || (key2 != null && key2.equals(e.key2))) && ((key3 == null && e.key3 == null) || (key3 != null && key3.equals(e.key3))) && ((key4 == null && e.key4 == null) || (key4 != null && key4.equals(e.key2))))
In this if statement key4 is checked against e.key2 instead of e.key4. We call this CopyPasteException .
If you could please fix this till the next version as it takes only a couple of minutes but without the fix we cannot use it in live system (as a page rendering is very slow).
Affected Versions
[2.2.0]