View | Details | Raw Unified | Return to bug 572324
Collapse All | Expand All

(-)org.eclipse.equinox.common_3.11.0/org/eclipse/core/internal/runtime/AdapterManager.java (-2 / +2 lines)
Lines 198-204 Link Here
198
	 * with the factory object that can perform that transformation. Returns 
198
	 * with the factory object that can perform that transformation. Returns 
199
	 * a table of adapter class name to factory object.
199
	 * a table of adapter class name to factory object.
200
	 */
200
	 */
201
	private Map<String, IAdapterFactory> getFactories(Class<? extends Object> adaptable) {
201
	private synchronized Map<String, IAdapterFactory> getFactories(Class<? extends Object> adaptable) {
202
		//cache reference to lookup to protect against concurrent flush
202
		//cache reference to lookup to protect against concurrent flush
203
		Map<String, Map<String, IAdapterFactory>> lookup = adapterLookup;
203
		Map<String, Map<String, IAdapterFactory>> lookup = adapterLookup;
204
		if (lookup == null)
204
		if (lookup == null)
Lines 378-384 Link Here
378
	/*
378
	/*
379
	 * @see IAdapterManager#registerAdapters
379
	 * @see IAdapterManager#registerAdapters
380
	 */
380
	 */
381
	public void registerFactory(IAdapterFactory factory, String adaptableType) {
381
	public synchronized void registerFactory(IAdapterFactory factory, String adaptableType) {
382
		List<IAdapterFactory> list = factories.get(adaptableType);
382
		List<IAdapterFactory> list = factories.get(adaptableType);
383
		if (list == null) {
383
		if (list == null) {
384
			list = new ArrayList<>(5);
384
			list = new ArrayList<>(5);

Return to bug 572324