Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2018-01-02 14:39:53 +0000
committerAlexander Kurtakov2018-01-02 14:39:53 +0000
commit96cec721b9b4969a9a8a22cd6a6d0991f730ba3a (patch)
tree07a107f4a067f41aad7cefb9329aa1497492981c /bundles/org.eclipse.equinox.p2.tests
parentbc97a6e13860545bdfa3d82611104e267dedf819 (diff)
downloadrt.equinox.p2-96cec721b9b4969a9a8a22cd6a6d0991f730ba3a.tar.gz
rt.equinox.p2-96cec721b9b4969a9a8a22cd6a6d0991f730ba3a.tar.xz
rt.equinox.p2-96cec721b9b4969a9a8a22cd6a6d0991f730ba3a.zip
Useless throws and instanceof checks. Change-Id: I104e88433c551512e68329b4648b8038d9ccd146 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.equinox.p2.tests')
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java10
-rw-r--r--bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/SurrogateProfileHandlerTest.java10
2 files changed, 11 insertions, 9 deletions
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java
index 3c2870166..a788c9754 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/artifact/repository/ArtifactOutputStreamTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2017 compeople AG and others.
+ * Copyright (c) 2007, 2018 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
@@ -11,13 +11,14 @@
*******************************************************************************/
package org.eclipse.equinox.p2.tests.artifact.repository;
-import java.io.*;
+import java.io.ByteArrayOutputStream;
+import java.io.File;
+import java.io.IOException;
import org.eclipse.core.runtime.Status;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository;
import org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.ArtifactOutputStream;
import org.eclipse.equinox.internal.p2.metadata.ArtifactKey;
import org.eclipse.equinox.internal.provisional.p2.artifact.repository.processing.ProcessingStep;
-import org.eclipse.equinox.internal.provisional.p2.repository.IStateful;
import org.eclipse.equinox.p2.metadata.IArtifactKey;
import org.eclipse.equinox.p2.metadata.Version;
import org.eclipse.equinox.p2.repository.artifact.IArtifactDescriptor;
@@ -61,8 +62,7 @@ public class ArtifactOutputStreamTest extends AbstractProvisioningTest {
}
public void testStatefullness() {
- assertTrue(aos instanceof IStateful);
- assertTrue(aos instanceof ArtifactOutputStream);
+ assertNotNull(aos);
}
public void testSingleCloseStreamOkDestinationOk() throws IOException {
diff --git a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/SurrogateProfileHandlerTest.java b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/SurrogateProfileHandlerTest.java
index eb975bf09..0856bac5a 100644
--- a/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/SurrogateProfileHandlerTest.java
+++ b/bundles/org.eclipse.equinox.p2.tests/src/org/eclipse/equinox/p2/tests/engine/SurrogateProfileHandlerTest.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2017 IBM Corporation and others.
+ * Copyright (c) 2005, 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
@@ -11,11 +11,13 @@
package org.eclipse.equinox.p2.tests.engine;
import java.io.File;
-import java.io.IOException;
import java.lang.reflect.Field;
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.eclipse.equinox.internal.p2.engine.*;
+import org.eclipse.equinox.internal.p2.engine.EngineActivator;
+import org.eclipse.equinox.internal.p2.engine.Profile;
+import org.eclipse.equinox.internal.p2.engine.SimpleProfileRegistry;
+import org.eclipse.equinox.internal.p2.engine.SurrogateProfileHandler;
import org.eclipse.equinox.p2.core.ProvisionException;
import org.eclipse.equinox.p2.engine.IProfile;
import org.eclipse.equinox.p2.engine.IProfileRegistry;
@@ -92,7 +94,7 @@ public class SurrogateProfileHandlerTest extends AbstractProvisioningTest {
assertEquals(2, queryResultSize(surrogateProfile.available(QueryUtil.createIUAnyQuery(), null)));
}
- public void testDropletsCanDetectFeatureGroup() throws IOException, ProvisionException {
+ public void testDropletsCanDetectFeatureGroup() throws ProvisionException {
// Droplet containing 'org.foo.bar', 'org.foo.bar.feature.feature.jar' and 'org.foo.bar.feature.feature.group'
File fragTestData = getTestData("0.1", "/testData/testRepos/foo-droplet");
File fragDir = getTempFolder();

Back to the top