Skip to main content

Please review my fix for bug 6827386

3 replies [Last post]
sergey_borodin
Offline
Joined: 2006-10-20
Points: 0

Synopsis:
ServiceManager.WritingThread throws ConcurrentModificationException occasionally

Description:
ServiceManager.WritingThread can throw ConcurrentModificationException, because its HashMap members are not thread-safe and are modified from both ServiceManager's thread and from WritingThread's thread.
For example ConcurrentModificationException occurs when WritingThread runs by HashMap keys in WritingThread.write() method and at the same time ServiceManager changes the same HashMap via public WritingThread.remove() method.

Changeset:
https://jtharness.dev.java.net/source/browse/jtharness/trunk/code/src/co...

Thanks,
Sergey

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bkurotsu
Offline
Joined: 2004-12-13
Points: 0

I will just add that there is a minor English error, the error message should say "Error occured while trying to access service streams.\n". It doesn't sound that bad using "when" instead of "while" though...

bkurotsu
Offline
Joined: 2004-12-13
Points: 0

Looks integrated, rev 1367 into trunk.

dimal
Offline
Joined: 2008-03-14
Points: 0

The fix works ok