Closed GoogleCodeExporter closed 8 years ago
> ConcurrentModificationException ... Should the method be synchronized or the
map be changed to ConcurrentHashMap?
Yes.
Except that the map is in the JDK/JRE ("namedLoggers" in
java.util.logging.LogManager). And I can't add synchronized or
ConcurrentHashMap in the JDK myself, nor prevent other threads to use the JDK.
(In fact, there is already "synchronized", a clone is only missing in that
"synchronized".)
There is already an issue for that in the Java bugdatabase, which explains and
gives the fix for JDK. It was created by a guy named Kohsuke.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6935026
Unfortunately, the bug was said as "Cannot reproduce" without a fix.
Original comment by evernat@free.fr
on 24 Jan 2014 at 10:56
I have added a work around to the JDK bug.
It's in the trunk (revision 3643) and ready for the next release (1.50).
And I have made a new build from the trunk, including the work around.
The new build is attached in this issue.
Original comment by evernat@free.fr
on 24 Jan 2014 at 11:17
Attachments:
To be more correct. It is a JDK bug which also exists in
org.apache.juli.ClassLoaderLogManager of Tomcat.
Original comment by evernat@free.fr
on 28 Jan 2014 at 3:39
There is an issue for this in Tomcat bugtracker:
https://issues.apache.org/bugzilla/show_bug.cgi?id=56082
As said by Mark Thomas: "This has been fixed in 8.0.x for 8.0.2 onwards and in
7.0.x for 7.0.51 onwards. It has also been proposed for 6.0.x.".
Note that the workaround is kept in javamelody for older Tomcat versions.
Original comment by evernat@free.fr
on 31 Jan 2014 at 10:06
Original issue reported on code.google.com by
fg1232...@gmail.com
on 23 Jan 2014 at 9:54