Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2020-04-06 19:59:10 +0000
committerAlexander Kurtakov2020-04-06 20:25:02 +0000
commit010ec318bdf1484d2e3967558eef188877f48fcb (patch)
tree0c7135b09ec5ec4a2efe15632cd718103e4133d5 /bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact
parenta2c5904abc2b7b414da76814ca2d5c384603ad34 (diff)
downloadrt.equinox.p2-010ec318bdf1484d2e3967558eef188877f48fcb.tar.gz
rt.equinox.p2-010ec318bdf1484d2e3967558eef188877f48fcb.tar.xz
rt.equinox.p2-010ec318bdf1484d2e3967558eef188877f48fcb.zip
Bug 536106 - pack200 is being deprecated in java 11 and removed fromI20200408-0600I20200407-1800I20200407-1210I20200407-0120I20200406-1800
java 14 Fix Pack200ProcessorStep to still return OK if it's not enabled due to missing pack200 utilities. Disable some tests that rely on packed content. Adjust others as on Java 14 packed content is not downloaded thus results differ. Change-Id: I65f16d4ebbc41e20ed7d2486ea9109fffa439779 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
index 9d4fd8580..9d85ac7ac 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/pack200/Pack200ProcessorStep.java
@@ -48,10 +48,18 @@ public class Pack200ProcessorStep extends AbstractBufferingStep {
@Override
public void initialize(IProvisioningAgent agent, IProcessingStepDescriptor descriptor, IArtifactDescriptor context) {
super.initialize(agent, descriptor, context);
+ boolean isJava14 = false;
+ if (System.getProperty("java.specification.version").compareTo("14") >= 0) { //$NON-NLS-1$ //$NON-NLS-2$
+ isJava14 = true;
+ }
+
if (!isEnabled()) {
IStatus status = null;
+ // Missing pack200 executable is fine on Java 14+
+ int statusCode = isJava14 ? IStatus.OK : IStatus.ERROR;
if (detailedResult) {
- status = new Status(IStatus.ERROR, Activator.ID, MirrorRequest.ARTIFACT_PROCESSING_ERROR, "Unpack facility not configured.", null); //$NON-NLS-1$
+ status = new Status(statusCode, Activator.ID, MirrorRequest.ARTIFACT_PROCESSING_ERROR,
+ "Unpack facility not configured.", null); //$NON-NLS-1$
detailedResult = true;
} else {
String[] locations = Utils.getPack200Commands("unpack200"); //$NON-NLS-1$
@@ -59,7 +67,9 @@ public class Pack200ProcessorStep extends AbstractBufferingStep {
for (String location : locations) {
locationTried.append(location).append(", "); //$NON-NLS-1$
}
- status = new Status(IStatus.ERROR, Activator.ID, MirrorRequest.ARTIFACT_PROCESSING_ERROR, "Unpack facility not configured. The locations searched for unpack200 are: " + locationTried, null); //$NON-NLS-1$
+ status = new Status(statusCode, Activator.ID, MirrorRequest.ARTIFACT_PROCESSING_ERROR,
+ "Unpack facility not configured. The locations searched for unpack200 are: " + locationTried, //$NON-NLS-1$
+ null);
}
setStatus(status);
}

Back to the top