Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Powell2010-12-06 12:04:01 -0500
committerSteve Powell2010-12-06 12:04:01 -0500
commit827ab8125e7ce3db16d4aea8cfef5239b9e4dc30 (patch)
treefe0e4d11a77fffe226266e44e1361b905272f871 /org.eclipse.virgo.medic.integrationtest/src
parent3dae7790ef66f8f950f5b2e070d5ad4f80eb6639 (diff)
downloadorg.eclipse.virgo.medic-827ab8125e7ce3db16d4aea8cfef5239b9e4dc30.tar.gz
org.eclipse.virgo.medic-827ab8125e7ce3db16d4aea8cfef5239b9e4dc30.tar.xz
org.eclipse.virgo.medic-827ab8125e7ce3db16d4aea8cfef5239b9e4dc30.zip
Remove warnings by using generics properly and suppressing deprecation warnings.
Diffstat (limited to 'org.eclipse.virgo.medic.integrationtest/src')
-rw-r--r--org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java15
-rw-r--r--org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF17
2 files changed, 15 insertions, 17 deletions
diff --git a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java
index 011fd33..9985a66 100644
--- a/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java
+++ b/org.eclipse.virgo.medic.integrationtest/src/test/java/org/eclipse/virgo/medic/eventlog/test/EventLogIntegrationTests.java
@@ -52,24 +52,21 @@ public class EventLogIntegrationTests {
this.bundleContext.installBundle("file:src/test/resources/message-fragment");
}
- @SuppressWarnings("unchecked")
@Test
public void availabilityOfEventLoggerFactory() {
- ServiceReference<EventLoggerFactory> serviceReference = (ServiceReference<EventLoggerFactory>)this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
+ ServiceReference<EventLoggerFactory> serviceReference = this.bundleContext.getServiceReference(EventLoggerFactory.class);
assertNotNull(serviceReference);
}
- @SuppressWarnings("unchecked")
@Test
public void availabilityOfEventLogger() {
- ServiceReference<EventLogger> serviceReference = (ServiceReference<EventLogger>)this.bundleContext.getServiceReference(EventLogger.class.getName());
+ ServiceReference<EventLogger> serviceReference = this.bundleContext.getServiceReference(EventLogger.class);
assertNotNull(serviceReference);
}
- @SuppressWarnings("unchecked")
@Test
public void eventLoggingWithMessageFromCurrentBundle() {
- ServiceReference<EventLogger> serviceReference = (ServiceReference<EventLogger>)this.bundleContext.getServiceReference(EventLogger.class.getName());
+ ServiceReference<EventLogger> serviceReference = this.bundleContext.getServiceReference(EventLogger.class);
assertNotNull(serviceReference);
EventLogger eventLogger = (EventLogger)this.bundleContext.getService(serviceReference);
eventLogger.log("1234", Level.WARNING, "orange", "lemon");
@@ -84,10 +81,9 @@ public class EventLogIntegrationTests {
}
- @SuppressWarnings("unchecked")
@Test
public void eventLoggingWithMessageFromFragment() throws Exception {
- ServiceReference<EventLoggerFactory> serviceReference = (ServiceReference<EventLoggerFactory>)this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
+ ServiceReference<EventLoggerFactory> serviceReference = this.bundleContext.getServiceReference(EventLoggerFactory.class);
assertNotNull(serviceReference);
EventLoggerFactory eventLoggerFactory = (EventLoggerFactory)this.bundleContext.getService(serviceReference);
EventLogger eventLogger = eventLoggerFactory.createEventLogger(this.messageBundle);
@@ -102,10 +98,9 @@ public class EventLogIntegrationTests {
assertEquals("Shared oak and sycamore", loggingEvent.get(0).getMessage());
}
- @SuppressWarnings("unchecked")
@Test
public void eventLoggingWithMessageFromSpecificBundle() throws Exception {
- ServiceReference<EventLoggerFactory> serviceReference = (ServiceReference<EventLoggerFactory>)this.bundleContext.getServiceReference(EventLoggerFactory.class.getName());
+ ServiceReference<EventLoggerFactory> serviceReference = this.bundleContext.getServiceReference(EventLoggerFactory.class);
assertNotNull(serviceReference);
EventLoggerFactory eventLoggerFactory = (EventLoggerFactory)this.bundleContext.getService(serviceReference);
EventLogger eventLogger = eventLoggerFactory.createEventLogger(this.messageBundle);
diff --git a/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF b/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF
index 73c910b..950f1b6 100644
--- a/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.medic.integrationtest/src/test/resources/META-INF/MANIFEST.MF
@@ -4,14 +4,17 @@ Bundle-Name: Medic Logging Integration Tests
Bundle-SymbolicName: org.eclipse.virgo.medic.log.test
Import-Package: ch.qos.logback.classic.spi,
ch.qos.logback.core,
+ org.aspectj.lang;version="[1.6.6,2)",
+ org.aspectj.lang.reflect;version="[1.6.6,2)",
+ org.aspectj.runtime.reflect;version="[1.6.6,2)",
+ org.eclipse.virgo.medic.dump;version="[2.2.0,2.3)",
+ org.eclipse.virgo.medic.eventlog;version="[2.2.0,2.3)",
org.eclipse.virgo.medic.log;version="[2.2.0,2.3)",
- org.eclipse.virgo.medic.log.appender,
- org.osgi.service.cm,
+ org.eclipse.virgo.test.framework;version=0,
+ org.junit;version=0,
+ org.junit.runner,
org.osgi.framework;version=0,
- org.slf4j,
- org.junit,
- org.eclipse.virgo.test.framework,
- org.eclipse.virgo.medic.dump,
- org.eclipse.virgo.medic.eventlog
+ org.osgi.service.cm;version=0,
+ org.slf4j
Bundle-Version: 1.0.0
Bundle-ManifestVersion: 2

Back to the top