From b0884f88d3486b56ee1edfd001b9f88dc85e915c Mon Sep 17 00:00:00 2001 From: Christian Schneider Date: Thu, 15 Dec 2016 12:41:01 +0100 Subject: [PATCH] [AMQ-6543] Cleanup warnings in karaf itests --- .../org/apache/activemq/karaf/itest/AbstractFeatureTest.java | 2 -- .../apache/activemq/karaf/itest/AbstractJmsFeatureTest.java | 1 + .../activemq/karaf/itest/ActiveMQBrokerFeatureTest.java | 1 - .../karaf/itest/ActiveMQBrokerNdCamelFeatureTest.java | 5 ----- .../itest/ActiveMQBrokerNdExternalCamelFeatureTest.java | 2 -- .../karaf/itest/ActiveMQBrokerRuntimeConfigTest.java | 1 - .../java/org/apache/activemq/karaf/itest/ObrFeatureTest.java | 1 - 7 files changed, 1 insertion(+), 12 deletions(-) diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java index b1f2a72404..aad2825564 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java @@ -18,8 +18,6 @@ package org.apache.activemq.karaf.itest; import javax.security.auth.Subject; -import org.apache.felix.service.command.CommandProcessor; -import org.apache.felix.service.command.CommandSession; import org.apache.karaf.features.FeaturesService; import org.apache.karaf.jaas.boot.principal.RolePrincipal; import org.apache.karaf.jaas.boot.principal.UserPrincipal; diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractJmsFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractJmsFeatureTest.java index 8a921b9869..16e9eebab0 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractJmsFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractJmsFeatureTest.java @@ -29,6 +29,7 @@ import org.apache.activemq.ActiveMQConnectionFactory; public abstract class AbstractJmsFeatureTest extends AbstractFeatureTest { + @SuppressWarnings("resource") public static void copyFile(File from, File to) throws IOException { if (!to.exists()) { System.err.println("Creating new file for: "+ to); diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java index 2d71c0975a..0025afa3d7 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerFeatureTest.java @@ -24,7 +24,6 @@ import java.util.concurrent.Callable; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.CoreOptions; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.junit.PaxExam; diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdCamelFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdCamelFeatureTest.java index ce32dfc247..b2a26abadb 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdCamelFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdCamelFeatureTest.java @@ -17,11 +17,8 @@ package org.apache.activemq.karaf.itest; import java.io.File; -import java.util.Date; import java.util.concurrent.Callable; -import org.apache.karaf.features.Feature; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.ops4j.pax.exam.MavenUtils; @@ -32,8 +29,6 @@ import org.ops4j.pax.exam.junit.PaxExam; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.editConfigurationFilePut; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.features; -import static org.ops4j.pax.exam.karaf.options.KarafDistributionOption.replaceConfigurationFile; @RunWith(PaxExam.class) public class ActiveMQBrokerNdCamelFeatureTest extends AbstractJmsFeatureTest { diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdExternalCamelFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdExternalCamelFeatureTest.java index 875af21de0..c217c20479 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdExternalCamelFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerNdExternalCamelFeatureTest.java @@ -21,11 +21,9 @@ import java.util.concurrent.Callable; import org.junit.Ignore; import org.junit.Test; -import org.junit.runner.RunWith; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; -import org.ops4j.pax.exam.junit.PaxExam; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerRuntimeConfigTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerRuntimeConfigTest.java index b07ef7e5fa..6b806ec73a 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerRuntimeConfigTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ActiveMQBrokerRuntimeConfigTest.java @@ -22,7 +22,6 @@ import java.util.concurrent.Callable; import java.util.concurrent.TimeUnit; import org.junit.Test; import org.junit.runner.RunWith; -import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.Configuration; import org.ops4j.pax.exam.junit.PaxExam; diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java index ea9a57d6b3..610d1a69b6 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java @@ -27,7 +27,6 @@ import org.ops4j.pax.exam.MavenUtils; import org.ops4j.pax.exam.Option; import org.ops4j.pax.exam.junit.PaxExam; import org.osgi.framework.Bundle; -import org.osgi.framework.ServiceReference; @RunWith(PaxExam.class)