Skip to content

Commit aa4840f

Browse files
committed
Fix for "Redundant specification of type arguments" error
See eclipse-platform/eclipse.platform#444
1 parent a6238d4 commit aa4840f

File tree

1 file changed

+4
-5
lines changed
  • bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui

1 file changed

+4
-5
lines changed

bundles/org.eclipse.equinox.p2.ui/src/org/eclipse/equinox/internal/p2/ui/QueryProvider.java

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
*******************************************************************************/
1515
package org.eclipse.equinox.internal.p2.ui;
1616

17-
import java.net.URI;
1817
import java.util.*;
1918
import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
2019
import org.eclipse.equinox.internal.p2.ui.model.*;
@@ -100,7 +99,7 @@ public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
10099
switch (queryType) {
101100
case ARTIFACT_REPOS :
102101
queryable = new QueryableArtifactRepositoryManager(ui, false).locationsQueriable();
103-
return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<URI>(), new ArtifactRepositoryElementWrapper(null, element));
102+
return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<>(), new ArtifactRepositoryElementWrapper(null, element));
104103

105104
case AVAILABLE_IUS :
106105
// Things get more complicated if the user wants to filter out installed items.
@@ -206,20 +205,20 @@ public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
206205
IQuery<IInstallableUnit> meetsAnyRequirementQuery = QueryUtil.createMatchQuery(factory.or(requirementExpressions));
207206
IQuery<IInstallableUnit> visibleAsAvailableQuery = policy.getVisibleAvailableIUQuery();
208207
IQuery<IInstallableUnit> createCompoundQuery = QueryUtil.createCompoundQuery(visibleAsAvailableQuery, meetsAnyRequirementQuery, true);
209-
return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(queryable, element));
208+
return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<>(), new InstalledIUElementWrapper(queryable, element));
210209
}
211210
profile = ProvUI.getAdapter(element, IProfile.class);
212211
if (profile == null)
213212
return null;
214-
return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(profile, element));
213+
return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<>(), new InstalledIUElementWrapper(profile, element));
215214

216215
case METADATA_REPOS :
217216
if (element instanceof MetadataRepositories) {
218217
if (queryable == null) {
219218
queryable = new QueryableMetadataRepositoryManager(ui, ((MetadataRepositories) element).getIncludeDisabledRepositories()).locationsQueriable();
220219
element.setQueryable(queryable);
221220
}
222-
return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<URI>(), new MetadataRepositoryElementWrapper(null, element));
221+
return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<>(), new MetadataRepositoryElementWrapper(null, element));
223222
}
224223
return null;
225224

0 commit comments

Comments
 (0)