diff options
| author | Carsten Hammer | 2021-01-13 05:50:29 +0000 |
|---|---|---|
| committer | Jeff Johnston | 2021-01-13 19:06:05 +0000 |
| commit | 45c8db5b5398dcccef411a6137c6db4028a33119 (patch) | |
| tree | 8baa3b2ef2d44cb6332836866b8ce3e5658fe55e | |
| parent | ea9270b0317e3b37ebf7b288833178a82bb4b589 (diff) | |
| download | eclipse.jdt.ui-45c8db5b5398dcccef411a6137c6db4028a33119.tar.gz eclipse.jdt.ui-45c8db5b5398dcccef411a6137c6db4028a33119.tar.xz eclipse.jdt.ui-45c8db5b5398dcccef411a6137c6db4028a33119.zip | |
Revert "Bug 570221 - Don't use subtype when supertype is fine"
This reverts commit 71c57cdeedcac3266f60e455d05d89bc1b5be564.
Reason for revert: multithreaded accesss to fsettings
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
Change-Id: Ib89b30ec0af39adc4fe27d2179708a7935500bfc
2 files changed, 8 insertions, 7 deletions
diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java index 3211bbe143..4b15d94ecc 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpRefactoringWizard.java @@ -20,7 +20,7 @@ import java.io.InputStream; import java.io.UnsupportedEncodingException; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; +import java.util.Hashtable; import java.util.List; import java.util.Map; @@ -96,7 +96,7 @@ public class CleanUpRefactoringWizard extends RefactoringWizard { private static class ProjectProfileLableProvider extends LabelProvider implements ITableLabelProvider { - private Map<String, Profile> fProfileIdsTable; + private Hashtable<String, Profile> fProfileIdsTable; @Override public Image getColumnImage(Object element, int columnIndex) { @@ -126,8 +126,8 @@ public class CleanUpRefactoringWizard extends RefactoringWizard { return null; } - private Map<String, Profile> loadProfiles() { - Map<String, Profile> profileIdsTable= new HashMap<>(); + private Hashtable<String, Profile> loadProfiles() { + Hashtable<String, Profile> profileIdsTable= new Hashtable<>(); for (Profile profile : CleanUpPreferenceUtil.loadProfiles(InstanceScope.INSTANCE)) { profileIdsTable.put(profile.getID(), profile); } @@ -135,7 +135,7 @@ public class CleanUpRefactoringWizard extends RefactoringWizard { return profileIdsTable; } - private String getProjectProfileName(final IJavaProject project, Map<String, Profile> profileIdsTable, String workbenchProfileId) { + private String getProjectProfileName(final IJavaProject project, Hashtable<String, Profile> profileIdsTable, String workbenchProfileId) { ProjectScope projectScope= new ProjectScope(project.getProject()); IEclipsePreferences node= projectScope.getNode(JavaUI.ID_PLUGIN); String id= node.get(CleanUpConstants.CLEANUP_PROFILE, null); @@ -360,7 +360,7 @@ public class CleanUpRefactoringWizard extends RefactoringWizard { configure.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - Map<String, String> workingValues= new HashMap<>(fCustomSettings); + Hashtable<String, String> workingValues= new Hashtable<>(fCustomSettings); CleanUpSelectionDialog dialog= new WizardCleanUpSelectionDialog(getShell(), workingValues); if (dialog.open() == Window.OK) { fCustomSettings= workingValues; diff --git a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpSaveParticipantPreferenceConfiguration.java b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpSaveParticipantPreferenceConfiguration.java index 58b8ccef16..8994870ad1 100644 --- a/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpSaveParticipantPreferenceConfiguration.java +++ b/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/fix/CleanUpSaveParticipantPreferenceConfiguration.java @@ -14,6 +14,7 @@ package org.eclipse.jdt.internal.ui.fix; import java.util.HashMap; +import java.util.Hashtable; import java.util.Map; import org.eclipse.swt.SWT; @@ -202,7 +203,7 @@ public class CleanUpSaveParticipantPreferenceConfiguration extends AbstractSaveP fConfigureButton.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { - Map<String, String> workingValues= new HashMap<>(fSettings); + Hashtable<String, String> workingValues= new Hashtable<>(fSettings); SaveActionSelectionDialog dialog= new SaveActionSelectionDialog(parent.getShell(), workingValues); if (dialog.open() == Window.OK) { fSettings= workingValues; |
