Skip to content

[Bug 74] fixed concurrentModificationExceptions for Synchronized EList's#204

Merged
fgdrf merged 1 commit into
locationtech:masterfrom
fgdrf:sync-elist-concurrent
Dec 21, 2015
Merged

[Bug 74] fixed concurrentModificationExceptions for Synchronized EList's#204
fgdrf merged 1 commit into
locationtech:masterfrom
fgdrf:sync-elist-concurrent

Conversation

@fgdrf

@fgdrf fgdrf commented Dec 18, 2015

Copy link
Copy Markdown
Contributor

EMF isn't thread safe and therefor its required to synchronize read and writes. Write access in uDig is synchroinzed using a Lock Object. But using an Iterator to read Elements of the list were not sychronized correctly.

In addition the javadoc indicated that users should synchronize on the list itself. If implemented this way synchronization is not consistent because the monitor is based on two different objects, the EList and the Lock Object. In result it causes ConcurrentModificationException's.

The pull request:

  • fixes Sychronized-EList
  • updates javadocs
  • adds two test cases

Many thanks to Erdal Karaca (@erdalkaraca) for the pair programming session!

AlsoBy: Erdal Karaca <erdal.karaca.de@googlemail.com>

Signed-off-by: Frank Gasdorf <fgdrf@users.sourceforge.net>
@eclipsewebmaster

Copy link
Copy Markdown

Issue tracker reference:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=74

@fgdrf

fgdrf commented Dec 18, 2015

Copy link
Copy Markdown
Contributor Author

Correct issue at LocationTech bugzilla instance : https://locationtech.org/bugs/show_bug.cgi?id=74

@fgdrf

fgdrf commented Dec 20, 2015

Copy link
Copy Markdown
Contributor Author

Hudson job for pull request finished successfully and two additional tests passed (https://hudson.locationtech.org/udig/job/uDig-PR-NG/12/testReport/org.locationtech.udig.project.internal.impl/SynchronizedEObjectEListTest/)

fgdrf added a commit that referenced this pull request Dec 21, 2015
[Bug 74] fixed ConcurrentModificationExceptions for Synchronized EList's
@fgdrf fgdrf merged commit 2e6bc78 into locationtech:master Dec 21, 2015
@fgdrf fgdrf deleted the sync-elist-concurrent branch December 21, 2015 06:37
@fgdrf fgdrf added this to the uDig-2.0.0 milestone Mar 18, 2017
@fgdrf fgdrf added the bug label Sep 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants