Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDJ Houghton2011-01-28 11:43:20 -0500
committerDJ Houghton2011-01-28 11:43:20 -0500
commitae116eabee98122e65bcf0ca5ad01a519c6cfc75 (patch)
treec3fd43bc2b179bd19607c88c0ce3547dcc464a94 /bundles/org.eclipse.equinox.p2.artifact.repository
parenteff1605e5781ebcd8688b21831bf5f003ea3f410 (diff)
downloadrt.equinox.p2-ae116eabee98122e65bcf0ca5ad01a519c6cfc75.tar.gz
rt.equinox.p2-ae116eabee98122e65bcf0ca5ad01a519c6cfc75.tar.xz
rt.equinox.p2-ae116eabee98122e65bcf0ca5ad01a519c6cfc75.zip
Bug 326476 - set the specific status code when artifact's md5 doesn't match the expected value
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.artifact.repository')
-rw-r--r--bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
index 49aa609a2..36406cade 100644
--- a/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
+++ b/bundles/org.eclipse.equinox.p2.artifact.repository/src/org/eclipse/equinox/internal/p2/artifact/processors/md5/MD5Verifier.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2008 compeople AG and others.
+ * Copyright (c) 2007, 2011 compeople AG and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.Activator;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
import org.eclipse.equinox.p2.core.IProvisioningAgent;
+import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
import org.eclipse.equinox.p2.repository.artifact.IProcessingStepDescriptor;
import org.eclipse.osgi.util.NLS;
@@ -78,7 +79,7 @@ public class MD5Verifier extends ProcessingStep {
// if the hashes don't line up set the status to error.
if (!buf.toString().equals(expectedMD5))
- setStatus(new Status(IStatus.ERROR, Activator.ID, NLS.bind(Messages.Error_unexpected_hash, expectedMD5, buf)));
+ setStatus(new Status(IStatus.ERROR, Activator.ID, ProvisionException.ARTIFACT_MD5_NOT_MATCH, NLS.bind(Messages.Error_unexpected_hash, expectedMD5, buf), null));
super.close();
}
}

Back to the top