diff options
author | Alexander Kurtakov | 2018-01-19 18:36:04 +0000 |
---|---|---|
committer | Alexander Kurtakov | 2018-01-19 18:36:04 +0000 |
commit | ce6bd8e1d2523a3654668ef6a9d80016aab8bb39 (patch) | |
tree | 726cc7a94d4b67a26739ad5d097f89575e6fecb6 | |
parent | a7a99e1fa49938a8f62d44d5c443d38981afeace (diff) | |
download | rt.equinox.p2-ce6bd8e1d2523a3654668ef6a9d80016aab8bb39.tar.gz rt.equinox.p2-ce6bd8e1d2523a3654668ef6a9d80016aab8bb39.tar.xz rt.equinox.p2-ce6bd8e1d2523a3654668ef6a9d80016aab8bb39.zip |
Cleanup RemoveIUTask.
* Remove useless throws declaration.
* Stop using deprecated methods.
Change-Id: If16f2246f596e8f9fabc90ac7bfa2d6c0edba4cd
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java index b9b8bd9e9..ddd98710a 100644 --- a/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java +++ b/bundles/org.eclipse.equinox.p2.repository.tools/src_ant/org/eclipse/equinox/p2/internal/repository/tools/tasks/RemoveIUTask.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2017 IBM Corporation and others. + * Copyright (c) 2009, 2018 IBM Corporation 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 @@ -12,8 +12,7 @@ package org.eclipse.equinox.p2.internal.repository.tools.tasks; import java.util.*; import org.apache.tools.ant.BuildException; -import org.eclipse.core.runtime.IProgressMonitor; -import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.*; import org.eclipse.equinox.p2.core.ProvisionException; import org.eclipse.equinox.p2.internal.repository.tools.AbstractApplication; import org.eclipse.equinox.p2.internal.repository.tools.Messages; @@ -40,7 +39,7 @@ public class RemoveIUTask extends AbstractRepositoryTask { return null; } - public void finalizeRepos() throws ProvisionException { + public void finalizeRepos() { super.finalizeRepositories(); } } @@ -86,12 +85,12 @@ public class RemoveIUTask extends AbstractRepositoryTask { boolean removeMetadata = (filter != null ? keys.size() > 0 : true); for (IArtifactKey key : keys) { if (filter == null) { - artifacts.removeDescriptor(key); + artifacts.removeDescriptor(key, new NullProgressMonitor()); } else { IArtifactDescriptor[] descriptors = artifacts.getArtifactDescriptors(key); for (int j = 0; j < descriptors.length; j++) { if (filter.match(createDictionary(descriptors[j]))) { - artifacts.removeDescriptor(descriptors[j]); + artifacts.removeDescriptor(descriptors[j], new NullProgressMonitor()); } else { removeMetadata = false; } @@ -110,11 +109,7 @@ public class RemoveIUTask extends AbstractRepositoryTask { } catch (ProvisionException e) { throw new BuildException(e); } finally { - try { - ((RemoveIUApplication) application).finalizeRepos(); - } catch (ProvisionException e) { - throw new BuildException(e); - } + ((RemoveIUApplication) application).finalizeRepos(); } } |