mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Use a synchronized map since it's updated with an ImmediateExecutor. Discussed with Pawel. No net behavioral change.
This commit is contained in:
parent
a6a34af6c4
commit
d1d38f73dc
1 changed files with 5 additions and 2 deletions
|
@ -11,6 +11,8 @@
|
|||
package org.eclipse.cdt.dsf.debug.ui.viewmodel.numberformat;
|
||||
|
||||
import com.ibm.icu.text.MessageFormat;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
@ -140,8 +142,9 @@ public class FormattedValueVMUtil {
|
|||
// First retrieve the available formats for each update's element (if
|
||||
// needed). Store the result in a map (for internal use) and in the
|
||||
// update object (if requested). After that's done, call another method
|
||||
// to retrieve the formatted values.
|
||||
final Map<IPropertiesUpdate, String[]> availableFormats = new HashMap<IPropertiesUpdate, String[]>(updates.length * 4/3);
|
||||
// to retrieve the formatted values. Note that we use a synchronized map
|
||||
// because it's updated by a request monitor with an ImmediateExecutor.
|
||||
final Map<IPropertiesUpdate, String[]> availableFormats = Collections.synchronizedMap(new HashMap<IPropertiesUpdate, String[]>(updates.length * 4/3));
|
||||
final CountingRequestMonitor countingRm = new CountingRequestMonitor(
|
||||
service.getExecutor(),
|
||||
new RequestMonitor(service.getExecutor(), monitor) {
|
||||
|
|
Loading…
Add table
Reference in a new issue