Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove workaround for fixed P2 bug #4217

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@
import org.eclipse.equinox.p2.publisher.IPublisherInfo;
import org.eclipse.equinox.p2.publisher.PublisherInfo;
import org.eclipse.equinox.p2.publisher.eclipse.Feature;
import org.eclipse.equinox.p2.repository.artifact.IArtifactRepositoryManager;
import org.eclipse.osgi.framework.util.CaseInsensitiveDictionaryMap;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.tycho.PackagingType;
Expand Down Expand Up @@ -117,7 +116,6 @@ public class InstallableUnitGenerator {
*/
public Map<MavenProject, Collection<IInstallableUnit>> getInstallableUnits(Collection<MavenProject> projects,
MavenSession session) throws CoreException {
init();
Objects.requireNonNull(session);
List<CoreException> errors = new CopyOnWriteArrayList<>();
Map<MavenProject, Collection<IInstallableUnit>> result = new ConcurrentHashMap<>();
Expand All @@ -141,13 +139,6 @@ public Map<MavenProject, Collection<IInstallableUnit>> getInstallableUnits(Colle
throw new CoreException(multiStatus);
}

private void init() {
// this requirement is here to bootstrap P2 service access
// see https://github.com/eclipse-equinox/p2/issues/100
// then this would not be required anymore
provisioningAgent.getService(IArtifactRepositoryManager.class);
}

/**
* Computes the {@link IInstallableUnit}s for the given project, the computation
* is cached unless forceUpdate is <code>true</code> meaning data is always
Expand All @@ -163,7 +154,6 @@ private void init() {
@SuppressWarnings("unchecked")
public Collection<IInstallableUnit> getInstallableUnits(MavenProject project, MavenSession session,
boolean forceUpdate) throws CoreException {
init();
Objects.requireNonNull(session);
log.debug("Computing installable units for " + project + ", force update = " + forceUpdate);
synchronized (project) {
Expand Down
Loading