Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 368706

Summary: ConfigurationElementMulti#getTranslatedAtIndex(...) not thread-safe
Product: [Eclipse Project] Platform Reporter: Jens Borrmann <jens.borrmann>
Component: RuntimeAssignee: platform-runtime-inbox <platform-runtime-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: ob1.eclipse, tjwatson
Version: 4.2   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jens Borrmann CLA 2012-01-16 07:55:28 EST
Build Identifier: 3.7

There is a small window of vulnerability in ConfigurationElementMulti#getTranslatedAtIndex(). The issue is not just theoretical but it happened in real life (multi user server-side application using RAP).

There has to be taken care of that there cannot be more than one put()-call into the DirectMap translatedProperties. 

Stacktrace:

java.lang.IllegalArgumentException
	at org.eclipse.core.internal.registry.DirectMap.put(DirectMap.java:44)
	at org.eclipse.core.internal.registry.ConfigurationElementMulti.getTranslatedAtIndex(ConfigurationElementMulti.java:65)
	at org.eclipse.core.internal.registry.ConfigurationElementMulti.getAttribute(ConfigurationElementMulti.java:47)
	at org.eclipse.core.internal.registry.ConfigurationElementMulti.getAttribute(ConfigurationElementMulti.java:111)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.getAttribute(ConfigurationElementHandle.java:34)
	at 
....

Reproducible: Sometimes
Comment 1 Thomas Watson CLA 2012-01-16 08:40:35 EST
(In reply to comment #0)
> Build Identifier: 3.7

Please try with 3.7.1 where this should be fixed.

*** This bug has been marked as a duplicate of bug 344696 ***