ConcurrentModificationException in RewriterFilter
--------------------------------------------------
Key: JBSEAM-4646
URL:
https://jira.jboss.org/jira/browse/JBSEAM-4646
Project: Seam
Issue Type: Bug
Affects Versions: 2.2.0.GA
Environment: Glassfish V3, Jdk1.6, windows XP SP3.
Reporter: alberto Gori
Fix For: 2.2.0.GA
Running long stress test I get this exception:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.jboss.seam.web.RewriteFilter.getAllPatterns(RewriteFilter.java:133)
at org.jboss.seam.web.RewriteFilter.doFilter(RewriteFilter.java:48)
...
Looking at the Seam code I can see the problem:
Collection<String> ids = pages.getKnownViewIds();
for (String id: ids) { << line 133!
..
}
In fact the backed map is synchronized, but you can't iterate over a synchronized map
without perfoming necessary synchronization operations:
http://java.sun.com/javase/6/docs/api/java/util/Collections.html#synchron...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira