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 a6238d4 commit aa4840f
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
*******************************************************************************/
package org.eclipse.equinox.internal.p2.ui;

import java.net.URI;
import java.util.*;
import org.eclipse.equinox.internal.p2.metadata.InstallableUnit;
import org.eclipse.equinox.internal.p2.ui.model.*;
Expand Down Expand Up @@ -100,7 +99,7 @@ public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
switch (queryType) {
case ARTIFACT_REPOS :
queryable = new QueryableArtifactRepositoryManager(ui, false).locationsQueriable();
return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<URI>(), new ArtifactRepositoryElementWrapper(null, element));
return new ElementQueryDescriptor(queryable, new RepositoryLocationQuery(), new Collector<>(), new ArtifactRepositoryElementWrapper(null, element));

case AVAILABLE_IUS :
// Things get more complicated if the user wants to filter out installed items.
Expand Down Expand Up @@ -206,20 +205,20 @@ public ElementQueryDescriptor getQueryDescriptor(final QueriedElement element) {
IQuery<IInstallableUnit> meetsAnyRequirementQuery = QueryUtil.createMatchQuery(factory.or(requirementExpressions));
IQuery<IInstallableUnit> visibleAsAvailableQuery = policy.getVisibleAvailableIUQuery();
IQuery<IInstallableUnit> createCompoundQuery = QueryUtil.createCompoundQuery(visibleAsAvailableQuery, meetsAnyRequirementQuery, true);
return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(queryable, element));
return new ElementQueryDescriptor(queryable, createCompoundQuery, new Collector<>(), new InstalledIUElementWrapper(queryable, element));
}
profile = ProvUI.getAdapter(element, IProfile.class);
if (profile == null)
return null;
return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<IInstallableUnit>(), new InstalledIUElementWrapper(profile, element));
return new ElementQueryDescriptor(profile, policy.getVisibleInstalledIUQuery(), new Collector<>(), new InstalledIUElementWrapper(profile, element));

case METADATA_REPOS :
if (element instanceof MetadataRepositories) {
if (queryable == null) {
queryable = new QueryableMetadataRepositoryManager(ui, ((MetadataRepositories) element).getIncludeDisabledRepositories()).locationsQueriable();
element.setQueryable(queryable);
}
return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<URI>(), new MetadataRepositoryElementWrapper(null, element));
return new ElementQueryDescriptor(element.getQueryable(), new RepositoryLocationQuery(), new Collector<>(), new MetadataRepositoryElementWrapper(null, element));
}
return null;

Expand Down

0 comments on commit aa4840f

Please sign in to comment.