DESCRIPTION

Bug 492930 - Disposal of an CompositeSideEffect causes an
ConcurrentModificationException

Change-Id: Iccbdd14d6f4cfefa8508d99a472a78f4475ec8d8
Signed-off-by: Krista Shepherd xxx@xxx.xxx

COMMENTS

author: Krista Shepherd
date: 2016-05-03 20:07:23.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2016-05-03 20:07:29.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9332/

-------------------------------------
author: Brenden Conley
date: 2016-05-03 20:25:02.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/platform/job/eclipse.platform.ui-Gerrit/9332/ : SUCCESS

-------------------------------------
author: Jayvion Booth
date: 2016-05-04 08:50:04.000000000

Patch Set 1: Code-Review-1

(1 comment)

Line:87, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/CompositeSideEffect.java -> I'm just wondering why shouldn't we copy the sideEffects list before this line and iterate over the local copy?

The problem I see is that between this and next line (and during traversal) the sideEffects content may change, leading to the inconsistent number of remove/dispose calls and unpredictable state.

-------------------------------------
author: Kelly Potter
date: 2016-05-04 13:42:50.000000000

Patch Set 1:

(3 comments)

Line:67, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/CompositeSideEffect.java -> Just curious: Why is this necessary?

Line:87, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/CompositeSideEffect.java -> The sideEffects content can't change between these two lines since CompositeSideEffect is single-threaded and doesn't invoke any methods between these two lines.

Line:111, bundles/org.eclipse.core.databinding.observable/src/org/eclipse/core/databinding/observable/sideeffect/CompositeSideEffect.java -> CopyOnWriteArrayList does unwanted synchronization, which is a performance problem. I'd suggest manually implementing the copy-on-write pattern using a normal ArrayList and a boolean to indicate if the list has been read (the copy can be omitted if there was no intervening read).

-------------------------------------
author: Gerrit Code Review
date: 2016-05-11 22:08:11.000000000

Change has been successfully merged into the git repository by Krista Shepherd

-------------------------------------
