Skip to content

Commit

Permalink
Fix for "Redundant specification of type arguments" error
Browse files Browse the repository at this point in the history
  • Loading branch information
iloveeclipse committed May 10, 2023
1 parent 880dc37 commit a6d09b2
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
package org.eclipse.e4.ui.workbench.renderers.swt;

import java.util.HashMap;
import java.util.Set;
import javax.annotation.PostConstruct;
import org.eclipse.e4.core.contexts.ContextInjectionFactory;
import org.eclipse.e4.core.contexts.IEclipseContext;
Expand Down Expand Up @@ -149,7 +148,7 @@ protected void initRenderer(AbstractPartRenderer renderer) {
@PostConstruct
public void init(IEclipseContext context) {
this.context = context;
this.context.set(SHARED_ELEMENTS_STORE, new HashMap<MUIElement, Set<MPlaceholder>>());
this.context.set(SHARED_ELEMENTS_STORE, new HashMap<>());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,8 @@ public SmartImportJob(File rootDirectory, Set<IWorkingSet> workingSets, boolean
setWorkingSets(workingSets);
this.configureProjects = configureProjects;
this.deepChildrenDetection = recuriveChildrenDetection;
this.report = Collections.synchronizedMap(new HashMap<IProject, List<ProjectConfigurator>>());
this.errors = Collections.synchronizedMap(new HashMap<IPath, Exception>());
this.report = Collections.synchronizedMap(new HashMap<>());
this.errors = Collections.synchronizedMap(new HashMap<>());
this.crawlerJobGroup = new JobGroup(DataTransferMessages.SmartImportJob_detectAndConfigureProjects, 0, 1);
}

Expand Down Expand Up @@ -350,7 +350,7 @@ private Set<IProject> searchAndImportChildrenProjectsRecursively(final IContaine
}
parentContainer.refreshLocal(IResource.DEPTH_ONE, progressMonitor); // make sure we know all children
Set<IFolder> childrenToProcess = new HashSet<>();
final Set<IProject> res = Collections.synchronizedSet(new HashSet<IProject>());
final Set<IProject> res = Collections.synchronizedSet(new HashSet<>());
for (IResource childResource : parentContainer.members()) {
if (childResource.getType() == IResource.FOLDER && !childResource.isDerived()) {
IPath location = childResource.getLocation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import java.util.ArrayList;
import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.ui.model.application.MApplication;
import org.eclipse.e4.ui.model.application.ui.basic.MTrimElement;
import org.eclipse.e4.ui.model.application.ui.basic.MTrimmedWindow;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.model.application.ui.menu.MMenu;
Expand Down Expand Up @@ -96,7 +95,7 @@ public CustomizeActionBars(IWorkbenchWindowConfigurer configurer, IEclipseContex
menuRenderer.linkModelToManager(mainMenu, menuManager);
windowModel.setMainMenu(mainMenu);

coolBarManager = new CoolBarToTrimManager(app, windowModel, new ArrayList<MTrimElement>(), rendererFactory);
coolBarManager = new CoolBarToTrimManager(app, windowModel, new ArrayList<>(), rendererFactory);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ public class TaskBarProgressManager {

private boolean isAnimated = false;

private List<Job> jobs = Collections.synchronizedList(new ArrayList<Job>());
private List<Job> jobs = Collections.synchronizedList(new ArrayList<>());

private Map<Job, JobInfo> jobInfoMap = Collections.synchronizedMap(new HashMap<Job, JobInfo>());
private Map<Job, JobInfo> jobInfoMap = Collections.synchronizedMap(new HashMap<>());

private final TaskItem taskItem;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
public abstract class AbstractIconDialogWithHardcodedScope extends SaveDialogBoundsSettingsDialog {
private TableViewer viewer;
private IProject project;
private Map<IFile, Image> icons = Collections.synchronizedMap(new HashMap<IFile, Image>());
private Map<IFile, Image> icons = Collections.synchronizedMap(new HashMap<>());
private ResourceSearchScope searchScope = ResourceSearchScope.PROJECT;

protected Messages Messages;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
*/
public abstract class AbstractIconDialogWithScopeAndFilter extends FilteredContributionDialog {
private final IProject project;
private final Map<IFile, Image> icons = Collections.synchronizedMap(new HashMap<IFile, Image>());
private final Map<IFile, Image> icons = Collections.synchronizedMap(new HashMap<>());

static public class Entry {
IFile file;
Expand Down

0 comments on commit a6d09b2

Please sign in to comment.