Skip to content

Commit

Permalink
Remove unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Sep 28, 2023
1 parent 03e790c commit 7d3ce58
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 41 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ public final class EclipseWorkspace<T> {

private T key;

private boolean init;

private Logger logger;

private Thread thread;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
*/
public class InstallableUnitCapability implements Capability {

private static final String P2_NS_IDENTITY = "osgi.identity";
private IProvidedCapability capability;
private InstallableUnitResource resource;
private Map<String, Object> attributes;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020, 2021 Christoph Läubrich and others.
* Copyright (c) 2020, 2023 Christoph Läubrich and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand All @@ -24,7 +24,6 @@
import org.eclipse.equinox.p2.metadata.IInstallableUnit;
import org.eclipse.equinox.p2.query.IQuery;
import org.eclipse.equinox.p2.query.IQueryResult;
import org.eclipse.equinox.p2.query.IQueryable;
import org.eclipse.equinox.p2.query.QueryUtil;
import org.eclipse.equinox.p2.repository.ICompositeRepository;
import org.eclipse.equinox.p2.repository.IRepositoryReference;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ public void mirrorReactor(RepositoryReferences sources, DestinationRepositoryDes
mirrorApp.setIncludeSources(includeAllSource, sources.getTargetPlatform());
mirrorApp.setIncludeRequiredBundles(includeRequiredBundles);
mirrorApp.setIncludeRequiredFeatures(includeRequiredFeatures);
mirrorApp.setIncludePacked(false); // no way, Tycho do no longer support packed artifacts anyways
mirrorApp.setFilterProvided(filterProvided);
mirrorApp.setEnvironments(context.getEnvironments());
SlicingOptions options = new SlicingOptions();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ public class MirrorApplication extends AbstractApplication implements IApplicati
private boolean mirrorReferences = true;
private String metadataOrArtifacts = null;
private String[] rootIUs = null;
private boolean includePacked = true;
private boolean mirrorProperties = false;

private File mirrorLogFile; // file to log mirror output to (optional)
Expand Down Expand Up @@ -281,7 +280,7 @@ protected Mirroring getMirroring(Collection<IInstallableUnit> ius, IProgressMoni
* Collect all artifacts from the IUs that should be mirrored
*
* @param ius
* the IUs that are selected for mirroring
* the IUs that are selected for mirroring
* @return a (modifiable) list of {@link IArtifactKey}s that must be mirrored
*/
protected List<IArtifactKey> collectArtifactKeys(Collection<IInstallableUnit> ius, IProgressMonitor monitor)
Expand Down Expand Up @@ -316,7 +315,7 @@ private void mirrorMetadata(Collection<IInstallableUnit> units, IProgressMonitor
* Collect all IUS from the slice that should be mirrored
*
* @param slice
* the slice for mirroring
* the slice for mirroring
* @return a (modifiable) set of {@link IInstallableUnit}s that must be mirrored
* @throws ProvisionException
*/
Expand All @@ -328,9 +327,9 @@ protected Set<IInstallableUnit> collectUnits(IQueryable<IInstallableUnit> slice,
}

/*
* Ensure all mandatory parameters have been set. Throw an exception if there are any missing.
* We don't require the user to specify the artifact repository here, we will default to the
* ones already registered in the manager. (callers are free to add more if they wish)
* Ensure all mandatory parameters have been set. Throw an exception if there are any missing. We
* don't require the user to specify the artifact repository here, we will default to the ones
* already registered in the manager. (callers are free to add more if they wish)
*/
private void validate() throws ProvisionException {
if (sourceRepositories.isEmpty())
Expand Down Expand Up @@ -558,10 +557,6 @@ public void setComparatorExclusions(IQuery<IArtifactDescriptor> exclusions) {
compareExclusions = exclusions;
}

public void setIncludePacked(boolean includePacked) {
this.includePacked = includePacked;
}

public void setMirrorProperties(boolean mirrorProperties) {
this.mirrorProperties = mirrorProperties;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2012 SAP AG and others.
* Copyright (c) 2012, 2023 SAP AG and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -27,7 +27,6 @@
import org.eclipse.tycho.IRepositoryIdManager;
import org.eclipse.tycho.core.test.utils.ResourceUtil;
import org.eclipse.tycho.p2maven.repository.DefaultMavenRepositorySettings;
import org.eclipse.tycho.p2maven.transport.DefaultTransportCacheConfig;
import org.eclipse.tycho.test.util.HttpServer;
import org.eclipse.tycho.test.util.LogVerifier;
import org.eclipse.tycho.testing.TychoPlexusTestCase;
Expand All @@ -46,7 +45,6 @@ public class RemoteAgentMavenMirrorsTest extends TychoPlexusTestCase {
public HttpServer localServer = new HttpServer();

private IProvisioningAgent subject;
private DefaultTransportCacheConfig transportConfig;

@Before
public void initSubject() throws Exception {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2008, 2020 Sonatype Inc. and others.
* Copyright (c) 2008, 2023 Sonatype Inc. and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -52,13 +52,13 @@ public class Feature {
*/
public static final String MATCH_GREATER_OR_EQUAL = "greaterOrEqual";
/**
* dependent plug-in version must be at least at the version specified, or at a higher service
* level or minor level (major version level must equal the specified version).
* dependent plug-in version must be at least at the version specified, or at a higher service level
* or minor level (major version level must equal the specified version).
*/
public static final String MATCH_COMPATIBLE = "compatible";
/**
* dependent plug-in version must be at least at the version specified, or at a higher service
* level (major and minor version levels must equal the specified version).
* dependent plug-in version must be at least at the version specified, or at a higher service level
* (major and minor version levels must equal the specified version).
*/
public static final String MATCH_EQUIVALENT = "equivalent";
/**
Expand Down Expand Up @@ -316,7 +316,7 @@ public static Feature readJar(File file) throws IOException {
* Convenience method to load feature.xml file from either feature jar file or directory.
*
* @throws RuntimeException
* if feature descriptor can not be read or parsed.
* if feature descriptor can not be read or parsed.
*/
public static Feature loadFeature(File location) {
try {
Expand Down Expand Up @@ -565,16 +565,4 @@ public Resource toJarResource() {
}
return featureJar.build();
}

private boolean isVersionedRef(ImportRef importRef) {
String version = importRef.getVersion();
if (version == null || version.isEmpty()) {
return false;
}
String match = importRef.getMatch();
if (match == null || match.isEmpty()) {
return false;
}
return true;
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2015 Rapicorp, Inc. and others.
* Copyright (c) 2015, 2023 Rapicorp, Inc. and others.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -37,7 +37,6 @@ public PackageIUMojoTest() {

public void testThatArtifactPayloadIsCorrect() throws Exception {
File basedir = getBasedir("projects/iuWithPayload/");
File platform = new File("src/test/resources/eclipse");
List<MavenProject> projects = getSortedProjects(basedir, properties);

MavenProject project = getProject(projects, "iuWithPayload");
Expand All @@ -55,7 +54,6 @@ public void testThatArtifactPayloadIsCorrect() throws Exception {

public void testArtifactWithoutPayload() throws Exception {
File basedir = getBasedir("projects/iuWithoutPayload");
File platform = new File("src/test/resources/eclipse");
List<MavenProject> projects = getSortedProjects(basedir, properties);

MavenProject project = getProject(projects, "iuWithoutPayload");
Expand All @@ -75,7 +73,6 @@ public void testArtifactWithoutPayload() throws Exception {

public void testInjectArtifactReference() throws Exception {
File basedir = getBasedir("projects/iuWithPayloadButNoArtifactReference");
File platform = new File("src/test/resources/eclipse");
List<MavenProject> projects = getSortedProjects(basedir, properties);

MavenProject project = getProject(projects, "iuWithPayloadButNoArtifactReference");
Expand Down

0 comments on commit 7d3ce58

Please sign in to comment.