Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2010-12-07 09:25:18 -0500
committerGlyn Normington2010-12-07 09:25:18 -0500
commit169e4967d8f4350db29887e692f887ea45cf7e19 (patch)
treeca83d094723908031d73e1a803e88a8904acb316
parent8c0e7abff5c0ca925115ce702073048e9fd19ceb (diff)
downloadorg.eclipse.virgo.kernel-169e4967d8f4350db29887e692f887ea45cf7e19.tar.gz
org.eclipse.virgo.kernel-169e4967d8f4350db29887e692f887ea45cf7e19.tar.xz
org.eclipse.virgo.kernel-169e4967d8f4350db29887e692f887ea45cf7e19.zip
bug 330236: fix remaining Equinox 3.7 warnings
-rw-r--r--org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF2
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java1
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java4
-rw-r--r--org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java4
-rw-r--r--org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/AbstractArtifact.java2
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java1
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/support/AbstractOsgiFramework.java1
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpander.java1
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpanderTests.java1
-rw-r--r--org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/RegionManagerTests.java1
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/Activator.java2
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelper.java9
-rw-r--r--org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java14
-rw-r--r--org.eclipse.virgo.kernel.services/src/main/java/org/eclipse/virgo/kernel/services/work/WorkAreaServiceFactory.java6
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolver.java2
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CommandResolver.java2
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CompoundCommandResolver.java2
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/LocalInputOutputManager.java2
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/ServicePropertyCommandResolver.java2
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/completers/ServiceRegistryCommandCompleterRegistry.java10
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/converters/ServiceRegistryConverterRegistry.java10
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundle.java8
-rw-r--r--org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveService.java4
-rw-r--r--org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundleTests.java3
-rw-r--r--org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveServiceTests.java4
-rw-r--r--org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/stubs/StubQuasiFramework.java3
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java4
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/dm/test/ModuleBeanFactoryPostProcessorTests.java2
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/RegionTests.java6
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/test/ClassLoadingHelperIntegrationTests.java5
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/AbstractKernelIntegrationTest.java4
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java4
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterTests.java4
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardKernelIntegrationTests.java2
-rw-r--r--org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF19
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java31
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java1
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/StandardPackageAdminUtil.java1
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/ServiceScopingStrategyTests.java12
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/equinox/AbstractOsgiFrameworkLaunchingTests.java25
-rw-r--r--org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/quasi/StubParameterised.java12
41 files changed, 123 insertions, 110 deletions
diff --git a/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF
index 7353e09c..c49e7c13 100644
--- a/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.kernel.deployer.test/src/main/java/META-INF/MANIFEST.MF
@@ -1,4 +1,6 @@
Manifest-Version: 1.0
+Bundle-ClassPath: .,org.springframework.beans-2.5.6.A.jar,org.springfr
+ amework.core-2.5.6.A.jar
Bundle-Version: 2.2.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: Virgo Kernel Deployer Test
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java
index cb08f03d..1fc41bf8 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ContextClassLoaderPostProcessor.java
@@ -43,6 +43,7 @@ final class ContextClassLoaderPostProcessor implements ModuleBeanFactoryPostProc
/**
* {@inheritDoc}
*/
+ @SuppressWarnings("deprecation")
public void postProcess(BundleContext bundleContext, ConfigurableListableBeanFactory beanFactory) {
String[] beanDefinitionNames = beanFactory.getBeanDefinitionNames();
for (String name : beanDefinitionNames) {
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java
index 1bb92fcd..0c044396 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/KernelLoadTimeWeaver.java
@@ -85,9 +85,9 @@ final class KernelLoadTimeWeaver implements LoadTimeWeaver, BeanClassLoaderAware
*/
private ClassLoader getBundleClassLoader(Bundle bundle) {
BundleContext bundleContext = bundle.getBundleContext();
- ServiceReference serviceReference = bundleContext.getServiceReference(OsgiFramework.class.getName());
+ ServiceReference<OsgiFramework> serviceReference = bundleContext.getServiceReference(OsgiFramework.class);
try {
- OsgiFramework framework = (OsgiFramework) bundleContext.getService(serviceReference);
+ OsgiFramework framework = bundleContext.getService(serviceReference);
return framework.getBundleClassLoader(bundle);
} finally {
bundleContext.ungetService(serviceReference);
diff --git a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
index 48af4475..5b02a000 100644
--- a/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
+++ b/org.eclipse.virgo.kernel.dmfragment/src/main/java/org/eclipse/virgo/kernel/dmfragment/internal/ServiceProxyRetryDisablingBundleListener.java
@@ -47,10 +47,10 @@ class ServiceProxyRetryDisablingBundleListener implements SynchronousBundleListe
if (event.getBundle().getBundleId() == 0 && event.getType() == BundleEvent.STOPPING) {
BundleContext bundleContext = event.getBundle().getBundleContext();
try {
- ServiceReference[] applicationContextServiceReferences = event.getBundle().getBundleContext().getAllServiceReferences(
+ ServiceReference<?>[] applicationContextServiceReferences = event.getBundle().getBundleContext().getAllServiceReferences(
ApplicationContext.class.getName(), null);
- for (ServiceReference applicationContextServiceReference : applicationContextServiceReferences) {
+ for (ServiceReference<?> applicationContextServiceReference : applicationContextServiceReferences) {
ApplicationContext applicationContext = (ApplicationContext) bundleContext.getService(applicationContextServiceReference);
ApplicationContextShutdownBean.disableServiceProxyRetry(applicationContext);
bundleContext.ungetService(applicationContextServiceReference);
diff --git a/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/AbstractArtifact.java b/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/AbstractArtifact.java
index aa484136..f6532c82 100644
--- a/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/AbstractArtifact.java
+++ b/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/AbstractArtifact.java
@@ -65,7 +65,7 @@ public abstract class AbstractArtifact implements Artifact {
} catch (InvalidSyntaxException e) {
throw new RuntimeException(String.format("Cannot create Service Registry filter for a DependencyDeterminer of type '%s'", type), e);
}
- this.dependencyDeterminerTracker = new ServiceTracker(bundleContext, filter, null);
+ this.dependencyDeterminerTracker = new ServiceTracker<DependencyDeterminer, DependencyDeterminer>(bundleContext, filter, null);
this.dependencyDeterminerTracker.open();
}
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java
index fd7aea0f..44574754 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/OsgiFramework.java
@@ -26,6 +26,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
* <code>OsgiFramework</code> class names.
*
*/
+@SuppressWarnings("deprecation")
public interface OsgiFramework {
/**
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/support/AbstractOsgiFramework.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/support/AbstractOsgiFramework.java
index d174b962..9052b7e4 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/support/AbstractOsgiFramework.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/framework/support/AbstractOsgiFramework.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
* Implementation is thread safe.
*
*/
+@SuppressWarnings("deprecation")
public abstract class AbstractOsgiFramework implements OsgiFramework {
public static final String DIRECTIVE_SEPARATOR = ";";
diff --git a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpander.java b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpander.java
index 0b1e4086..8888f3df 100644
--- a/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpander.java
+++ b/org.eclipse.virgo.kernel.osgi/src/main/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpander.java
@@ -43,6 +43,7 @@ import org.eclipse.virgo.util.osgi.manifest.DynamicallyImportedPackage;
* Thread safe.
*
*/
+@SuppressWarnings("deprecation")
final class PackageImportWildcardExpander {
private static final String wildcard = "*";
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpanderTests.java b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpanderTests.java
index 9e3105b3..e8b54865 100644
--- a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpanderTests.java
+++ b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/PackageImportWildcardExpanderTests.java
@@ -28,6 +28,7 @@ import org.eclipse.virgo.teststubs.osgi.framework.StubBundleContext;
/**
*/
+@SuppressWarnings("deprecation")
public class PackageImportWildcardExpanderTests {
private StubBundleContext stubBundleContext;
diff --git a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/RegionManagerTests.java b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/RegionManagerTests.java
index d515db84..b7592cc8 100644
--- a/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/RegionManagerTests.java
+++ b/org.eclipse.virgo.kernel.osgi/src/test/java/org/eclipse/virgo/kernel/osgi/region/RegionManagerTests.java
@@ -52,6 +52,7 @@ public class RegionManagerTests {
Framework user = createMock(Framework.class);
SurrogateBundle surrogate = createMock(SurrogateBundle.class);
+ @SuppressWarnings("unchecked")
ServiceFactory<EventLogger> serviceFactory = createMock(ServiceFactory.class);
CompositeBundleFactory factory = createMock(CompositeBundleFactory.class);
diff --git a/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/Activator.java b/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/Activator.java
index 176926c6..ebd6d8ae 100644
--- a/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/Activator.java
+++ b/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/Activator.java
@@ -37,7 +37,7 @@ public class Activator implements BundleActivator {
private static final int SERVICE_WAIT_PAUSE = 100; // 100 milliseconds
private static final String PROVIDER_NAME = "org.eclipse.osgi.framework.console.CommandProvider"; //$NON-NLS-1$
- private ServiceRegistration providerRegistration = null;
+ private ServiceRegistration<?> providerRegistration = null;
private final ServiceRegistrationTracker registrationTracker = new ServiceRegistrationTracker();
public void start(BundleContext context) throws Exception {
diff --git a/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelper.java b/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelper.java
index 4cf5f747..2614a2cb 100644
--- a/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelper.java
+++ b/org.eclipse.virgo.kernel.osgicommand/src/main/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelper.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
/**
* Helper for class loading supporting commands
*/
+@SuppressWarnings("deprecation")
public class ClassLoadingHelper {
/**
@@ -35,8 +36,8 @@ public class ClassLoadingHelper {
* @return TRUE if the bundle is exported by the package, FALSE if the class is not exported or it does not have a package
*/
public static boolean isPackageExported(BundleContext bundleContext, String classPackage, Bundle testBundle) {
- ServiceReference reference = bundleContext.getServiceReference(PlatformAdmin.class.getName());
- PlatformAdmin platformAdmin = (PlatformAdmin) bundleContext.getService(reference);
+ ServiceReference<PlatformAdmin> reference = bundleContext.getServiceReference(PlatformAdmin.class);
+ PlatformAdmin platformAdmin = bundleContext.getService(reference);
BundleDescription bundleDescription = platformAdmin.getState(false).getBundle(testBundle.getBundleId());
ExportPackageDescription[] exportDescriptions = bundleDescription.getSelectedExports();
@@ -137,8 +138,8 @@ public class ClassLoadingHelper {
result.put(testBundle, originBundle);
}
} else {
- ServiceReference reference = bundleContext.getServiceReference(PackageAdmin.class.getName());
- PackageAdmin packageAdmin = (PackageAdmin) bundleContext.getService(reference);
+ ServiceReference<PackageAdmin> reference = bundleContext.getServiceReference(PackageAdmin.class);
+ PackageAdmin packageAdmin = bundleContext.getService(reference);
Bundle[] bundles = packageAdmin.getBundles(bundle, null);
if (bundles == null)
throw new IllegalArgumentException("Bundle with symbolic name [" + bundle + "] not found");
diff --git a/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java b/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java
index a4d64009..65d06402 100644
--- a/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java
+++ b/org.eclipse.virgo.kernel.osgicommand/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/ClassLoadingHelperTests.java
@@ -32,6 +32,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
/**
* Class for unit testing {@link ClassLoadingHelper}
*/
+@SuppressWarnings("deprecation")
public class ClassLoadingHelperTests {
private static final long BUNDLE_ID = 1234;
@@ -39,6 +40,7 @@ public class ClassLoadingHelperTests {
private static final String CLASS_NAME = ClassLoadingHelperTests.class.getName();
private static final String CLASS_PACKAGE = ClassLoadingHelperTests.class.getPackage().getName();
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testIsMissingPackageExported() throws Exception {
PlatformAdmin platformAdmin = createMock(PlatformAdmin.class);
@@ -49,7 +51,7 @@ public class ClassLoadingHelperTests {
BundleDescription bundleDescription = createMock(BundleDescription.class);
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
- expect(bundleContext.getServiceReference(PlatformAdmin.class.getName())).andReturn(platformAdminServiceReference);
+ expect(bundleContext.getServiceReference(PlatformAdmin.class)).andReturn(platformAdminServiceReference);
expect(bundleContext.getService(platformAdminServiceReference)).andReturn(platformAdmin);
expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[0]);
expect(platformAdmin.getState(false)).andReturn(bundleState);
@@ -63,6 +65,7 @@ public class ClassLoadingHelperTests {
verify(platformAdmin, platformAdminServiceReference, bundle, bundleContext, bundleState, bundleDescription);
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testIsExistingPackageExported() throws Exception {
PlatformAdmin platformAdmin = createMock(PlatformAdmin.class);
@@ -74,7 +77,7 @@ public class ClassLoadingHelperTests {
ExportPackageDescription exportPackageDescription = createMock(ExportPackageDescription.class);
expect(bundle.getBundleId()).andReturn(BUNDLE_ID);
- expect(bundleContext.getServiceReference(PlatformAdmin.class.getName())).andReturn(platformAdminServiceReference);
+ expect(bundleContext.getServiceReference(PlatformAdmin.class)).andReturn(platformAdminServiceReference);
expect(bundleContext.getService(platformAdminServiceReference)).andReturn(platformAdmin);
expect(exportPackageDescription.getName()).andReturn(CLASS_PACKAGE);
expect(bundleDescription.getSelectedExports()).andReturn(new ExportPackageDescription[]{exportPackageDescription});
@@ -154,6 +157,7 @@ public class ClassLoadingHelperTests {
verify(bundle, bundleContext);
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testGetBundleLoadingMissingClass() throws Exception {
Bundle bundle = createMock(Bundle.class);
@@ -162,7 +166,7 @@ public class ClassLoadingHelperTests {
ServiceReference packageAdminServiceReference = createMock(ServiceReference.class);
expect(bundle.loadClass(CLASS_NAME)).andReturn(null); // missing class
- expect(bundleContext.getServiceReference(PackageAdmin.class.getName())).andReturn(packageAdminServiceReference);
+ expect(bundleContext.getServiceReference(PackageAdmin.class)).andReturn(packageAdminServiceReference);
expect(bundleContext.getService(packageAdminServiceReference)).andReturn(packageAdmin);
expect(packageAdmin.getBundles(BUNDLE_SYMBOLIC_NAME, null)).andReturn(new Bundle[]{bundle});
@@ -174,7 +178,7 @@ public class ClassLoadingHelperTests {
verify(bundle, bundleContext, packageAdmin, packageAdminServiceReference);
}
- @SuppressWarnings("rawtypes")
+ @SuppressWarnings({ "rawtypes", "unchecked" })
@Test
public void testGetBundleLoadingExistingClass() throws Exception {
Bundle bundle = createMock(Bundle.class);
@@ -184,7 +188,7 @@ public class ClassLoadingHelperTests {
expect((Class)bundle.loadClass(CLASS_NAME)).andReturn(ClassLoadingHelperTests.class);
expect(bundleContext.getBundle(0)).andReturn(bundle);
- expect(bundleContext.getServiceReference(PackageAdmin.class.getName())).andReturn(packageAdminServiceReference);
+ expect(bundleContext.getServiceReference(PackageAdmin.class)).andReturn(packageAdminServiceReference);
expect(bundleContext.getService(packageAdminServiceReference)).andReturn(packageAdmin);
expect(packageAdmin.getBundles(BUNDLE_SYMBOLIC_NAME, null)).andReturn(new Bundle[]{bundle});
diff --git a/org.eclipse.virgo.kernel.services/src/main/java/org/eclipse/virgo/kernel/services/work/WorkAreaServiceFactory.java b/org.eclipse.virgo.kernel.services/src/main/java/org/eclipse/virgo/kernel/services/work/WorkAreaServiceFactory.java
index 31657aba..d96cfdb8 100644
--- a/org.eclipse.virgo.kernel.services/src/main/java/org/eclipse/virgo/kernel/services/work/WorkAreaServiceFactory.java
+++ b/org.eclipse.virgo.kernel.services/src/main/java/org/eclipse/virgo/kernel/services/work/WorkAreaServiceFactory.java
@@ -29,7 +29,7 @@ import org.osgi.framework.ServiceRegistration;
* Threadsafe.
*
*/
-public final class WorkAreaServiceFactory implements ServiceFactory {
+public final class WorkAreaServiceFactory implements ServiceFactory<WorkArea> {
private final File workDirectory;
@@ -37,10 +37,10 @@ public final class WorkAreaServiceFactory implements ServiceFactory {
this.workDirectory = workDirectory;
}
- public Object getService(Bundle bundle, ServiceRegistration registration) {
+ public WorkArea getService(Bundle bundle, ServiceRegistration<WorkArea> registration) {
return new StandardWorkArea(this.workDirectory, bundle);
}
- public void ungetService(Bundle bundle, ServiceRegistration registration, Object service) {
+ public void ungetService(Bundle bundle, ServiceRegistration<WorkArea> registration, WorkArea service) {
}
}
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolver.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolver.java
index ba8963e4..90f7ecda 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolver.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/AnnotationBasedCommandResolver.java
@@ -33,7 +33,7 @@ import org.osgi.framework.ServiceReference;
*/
final class AnnotationBasedCommandResolver implements CommandResolver {
- public List<CommandDescriptor> resolveCommands(ServiceReference serviceReference, Object object) {
+ public List<CommandDescriptor> resolveCommands(ServiceReference<?> serviceReference, Object object) {
List<CommandDescriptor> commandDescriptors = new ArrayList<CommandDescriptor>();
Class<? extends Object> clazz = object.getClass();
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CommandResolver.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CommandResolver.java
index 5daa0b84..011dec0c 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CommandResolver.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CommandResolver.java
@@ -33,6 +33,6 @@ interface CommandResolver {
* @param service The service
* @return A <code>List</code> of <code>CommandDescriptor</code>s or an empty list if no commands were found
*/
- List<CommandDescriptor> resolveCommands(ServiceReference serviceReference, Object service);
+ List<CommandDescriptor> resolveCommands(ServiceReference<?> serviceReference, Object service);
}
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CompoundCommandResolver.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CompoundCommandResolver.java
index 11a0c523..1e96250b 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CompoundCommandResolver.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/CompoundCommandResolver.java
@@ -37,7 +37,7 @@ final class CompoundCommandResolver implements CommandResolver {
/**
* {@inheritDoc}
*/
- public List<CommandDescriptor> resolveCommands(ServiceReference serviceReference, Object service) {
+ public List<CommandDescriptor> resolveCommands(ServiceReference<?> serviceReference, Object service) {
List<CommandDescriptor> commandDescriptors = new ArrayList<CommandDescriptor>();
for (CommandResolver commandResolver : commandResolvers) {
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/LocalInputOutputManager.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/LocalInputOutputManager.java
index bc098408..ef5f804b 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/LocalInputOutputManager.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/LocalInputOutputManager.java
@@ -108,7 +108,7 @@ public final class LocalInputOutputManager {
}
private static Object getService(Class<?> clazz, BundleContext bundleContext, String filter) {
- ServiceReference[] serviceReferences;
+ ServiceReference<?>[] serviceReferences;
try {
serviceReferences = bundleContext.getServiceReferences(clazz.getName(), filter);
} catch (InvalidSyntaxException e) {
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/ServicePropertyCommandResolver.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/ServicePropertyCommandResolver.java
index 627835c5..712b9c66 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/ServicePropertyCommandResolver.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/ServicePropertyCommandResolver.java
@@ -36,7 +36,7 @@ public class ServicePropertyCommandResolver implements CommandResolver {
/**
* {@inheritDoc}
*/
- public List<CommandDescriptor> resolveCommands(ServiceReference serviceReference, Object service) {
+ public List<CommandDescriptor> resolveCommands(ServiceReference<?> serviceReference, Object service) {
String[] commands = (String[])serviceReference.getProperty(SERVICE_PROPERTY_COMMAND_FUNCTION);
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/completers/ServiceRegistryCommandCompleterRegistry.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/completers/ServiceRegistryCommandCompleterRegistry.java
index eda6c3a6..149c7ac3 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/completers/ServiceRegistryCommandCompleterRegistry.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/completers/ServiceRegistryCommandCompleterRegistry.java
@@ -59,9 +59,9 @@ final class ServiceRegistryCommandCompleterRegistry implements CommandCompleterR
void initialize() {
try {
this.bundleContext.addServiceListener(this.commandCompleterRegistryServiceListener, "(objectClass=" + CommandCompleter.class.getName() + ")");
- ServiceReference[] serviceReferences = this.bundleContext.getServiceReferences(CommandCompleter.class.getName(), null);
+ ServiceReference<?>[] serviceReferences = this.bundleContext.getServiceReferences(CommandCompleter.class.getName(), null);
if (serviceReferences != null) {
- for (ServiceReference serviceReference : serviceReferences) {
+ for (ServiceReference<?> serviceReference : serviceReferences) {
serviceRegistered(serviceReference);
}
}
@@ -70,7 +70,7 @@ final class ServiceRegistryCommandCompleterRegistry implements CommandCompleterR
}
}
- private void serviceRegistered(ServiceReference serviceReference) {
+ private void serviceRegistered(ServiceReference<?> serviceReference) {
CommandCompleter completer = (CommandCompleter)bundleContext.getService(serviceReference);
if (completer != null) {
String[] commandNames = getCommandNames(serviceReference);
@@ -80,7 +80,7 @@ final class ServiceRegistryCommandCompleterRegistry implements CommandCompleterR
}
}
- private String[] getCommandNames(ServiceReference serviceReference) {
+ private String[] getCommandNames(ServiceReference<?> serviceReference) {
Object commandNamesProperty = serviceReference.getProperty(CommandCompleter.SERVICE_PROPERTY_COMPLETER_COMMAND_NAMES);
String[] commandNames;
@@ -94,7 +94,7 @@ final class ServiceRegistryCommandCompleterRegistry implements CommandCompleterR
return commandNames;
}
- private void serviceUnregistering(ServiceReference serviceReference) {
+ private void serviceUnregistering(ServiceReference<?> serviceReference) {
Object converter = this.bundleContext.getService(serviceReference);
if (converter != null) {
String[] commandNames = getCommandNames(serviceReference);
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/converters/ServiceRegistryConverterRegistry.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/converters/ServiceRegistryConverterRegistry.java
index 5a74e8c7..49473606 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/converters/ServiceRegistryConverterRegistry.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/internal/converters/ServiceRegistryConverterRegistry.java
@@ -61,9 +61,9 @@ final class ServiceRegistryConverterRegistry implements ConverterRegistry {
void initialize() {
try {
this.bundleContext.addServiceListener(this.converterRegistryServiceListener, "(objectClass=" + Converter.class.getName() + ")");
- ServiceReference[] serviceReferences = this.bundleContext.getServiceReferences(Converter.class.getName(), null);
+ ServiceReference<?>[] serviceReferences = this.bundleContext.getServiceReferences(Converter.class.getName(), null);
if (serviceReferences != null) {
- for (ServiceReference serviceReference : serviceReferences) {
+ for (ServiceReference<?> serviceReference : serviceReferences) {
serviceRegistered(serviceReference);
}
}
@@ -72,7 +72,7 @@ final class ServiceRegistryConverterRegistry implements ConverterRegistry {
}
}
- private void serviceRegistered(ServiceReference serviceReference) {
+ private void serviceRegistered(ServiceReference<?> serviceReference) {
Converter converter = (Converter)bundleContext.getService(serviceReference);
if (converter != null) {
String[] converterClasses = getConverterClasses(serviceReference);
@@ -82,7 +82,7 @@ final class ServiceRegistryConverterRegistry implements ConverterRegistry {
}
}
- private String[] getConverterClasses(ServiceReference serviceReference) {
+ private String[] getConverterClasses(ServiceReference<?> serviceReference) {
Object converterClassesProperty = serviceReference.getProperty(Converter.CONVERTER_CLASSES);
String[] converterClasses;
@@ -96,7 +96,7 @@ final class ServiceRegistryConverterRegistry implements ConverterRegistry {
return converterClasses;
}
- private void serviceUnregistering(ServiceReference serviceReference) {
+ private void serviceUnregistering(ServiceReference<?> serviceReference) {
Object converter = this.bundleContext.getService(serviceReference);
if (converter != null) {
synchronized (monitor) {
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundle.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundle.java
index 8930db6b..c7bf5916 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundle.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundle.java
@@ -59,11 +59,11 @@ final class StandardQuasiLiveBundle implements QuasiLiveBundle {
*/
public List<QuasiLiveService> getExportedServices() {
List<QuasiLiveService> quasiLiveServices = new ArrayList<QuasiLiveService>();
- ServiceReference[] registeredServices = this.osgiBundle.getRegisteredServices();
+ ServiceReference<?>[] registeredServices = this.osgiBundle.getRegisteredServices();
if(registeredServices == null){
return quasiLiveServices;
}
- for(ServiceReference serviceReference : registeredServices){
+ for(ServiceReference<?> serviceReference : registeredServices){
quasiLiveServices.add(new StandardQuasiLiveService(this.quasiFramework, serviceReference));
}
return quasiLiveServices;
@@ -74,11 +74,11 @@ final class StandardQuasiLiveBundle implements QuasiLiveBundle {
*/
public List<QuasiLiveService> getImportedServices() {
List<QuasiLiveService> quasiLiveServices = new ArrayList<QuasiLiveService>();
- ServiceReference[] registeredServices = this.osgiBundle.getServicesInUse();
+ ServiceReference<?>[] registeredServices = this.osgiBundle.getServicesInUse();
if(registeredServices == null){
return quasiLiveServices;
}
- for(ServiceReference serviceReference : registeredServices){
+ for(ServiceReference<?> serviceReference : registeredServices){
quasiLiveServices.add(new StandardQuasiLiveService(this.quasiFramework, serviceReference));
}
return quasiLiveServices;
diff --git a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveService.java b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveService.java
index daaf1933..5f898db5 100644
--- a/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveService.java
+++ b/org.eclipse.virgo.kernel.shell/src/main/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveService.java
@@ -40,11 +40,11 @@ import org.eclipse.virgo.kernel.shell.state.QuasiLiveService;
*/
final public class StandardQuasiLiveService implements QuasiLiveService, Comparable<QuasiLiveService> {
- private final ServiceReference serviceReference;
+ private final ServiceReference<?> serviceReference;
private final QuasiFramework quasiFramework;
- public StandardQuasiLiveService(QuasiFramework quasiFramework, ServiceReference serviceReference) {
+ public StandardQuasiLiveService(QuasiFramework quasiFramework, ServiceReference<?> serviceReference) {
this.serviceReference = serviceReference;
this.quasiFramework = quasiFramework;
}
diff --git a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundleTests.java b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundleTests.java
index 23875a17..f09605c4 100644
--- a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundleTests.java
+++ b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveBundleTests.java
@@ -177,8 +177,9 @@ public class StandardQuasiLiveBundleTests {
assertEquals(this.stubQuasiBundle.isResolved(), this.standardQuasiLiveBundle.isResolved());
}
+ @SuppressWarnings("unchecked")
private void registerFakeAppContext() {
- this.stubOsgiBundle.addRegisteredService(new StubServiceReference(new StubServiceRegistration(new StubBundleContext(),
+ this.stubOsgiBundle.addRegisteredService(new StubServiceReference<Object>(new StubServiceRegistration<Object>(new StubBundleContext(),
ApplicationContext.class.getName())));
}
diff --git a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveServiceTests.java b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveServiceTests.java
index 5811f9f5..454de751 100644
--- a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveServiceTests.java
+++ b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/state/internal/StandardQuasiLiveServiceTests.java
@@ -45,12 +45,12 @@ public class StandardQuasiLiveServiceTests {
*/
@Before
public void setUp() throws Exception {
- StubServiceRegistration serviceRegistration = new StubServiceRegistration(new StubBundleContext());
+ StubServiceRegistration<Object> serviceRegistration = new StubServiceRegistration<Object>(new StubBundleContext());
Dictionary<String, Object> properties = new Hashtable<String, Object>();
properties.put(Constants.OBJECTCLASS, new String[] { "one", "two" });
properties.put("Random", "foo");
serviceRegistration.setProperties(properties);
- StubServiceReference stubServiceReference = new StubServiceReference(38l, 6, serviceRegistration);
+ StubServiceReference<Object> stubServiceReference = new StubServiceReference<Object>(38l, 6, serviceRegistration);
stubServiceReference.setBundle(new StubBundle(4l, "Name", new Version("1.2.3"), "Location"));
stubServiceReference.addUsingBundles(new StubBundle(), new StubBundle());
StubQuasiFramework stubQuasiFramework = new StubQuasiFramework();
diff --git a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/stubs/StubQuasiFramework.java b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/stubs/StubQuasiFramework.java
index 38420f99..702a8688 100644
--- a/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/stubs/StubQuasiFramework.java
+++ b/org.eclipse.virgo.kernel.shell/src/test/java/org/eclipse/virgo/kernel/shell/stubs/StubQuasiFramework.java
@@ -40,11 +40,12 @@ public class StubQuasiFramework implements QuasiFramework{
private final StubBundle stubBundle;
private final StubBundleContext stubBundleContext;
+ @SuppressWarnings("unchecked")
public StubQuasiFramework() {
this.stubBundle = new StubBundle(4L, "test.symbolic.name", new Version("0"), "");
this.stubBundleContext = new StubBundleContext(stubBundle);
this.stubBundleContext.addInstalledBundle(stubBundle);
- this.stubBundle.addRegisteredService(new StubServiceReference(new StubServiceRegistration(this.stubBundleContext)));
+ this.stubBundle.addRegisteredService(new StubServiceReference<Object>(new StubServiceRegistration<Object>(this.stubBundleContext)));
}
public void commit() throws BundleException {
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java
index 52dc0e77..8502aef5 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/concurrent/test/ApplicationContextDependencyMonitorIntegrationTests.java
@@ -55,8 +55,8 @@ public class ApplicationContextDependencyMonitorIntegrationTests extends Abstrac
Bundle quickConsumer = quasiQuickConsumer.getBundle();
- ServiceReference serviceReference = this.kernelContext.getServiceReference(BundleStarter.class.getName());
- BundleStarter bundleStarter = (BundleStarter) this.kernelContext.getService(serviceReference);
+ ServiceReference<BundleStarter> serviceReference = this.kernelContext.getServiceReference(BundleStarter.class);
+ BundleStarter bundleStarter = this.kernelContext.getService(serviceReference);
final CountDownLatch latch = new CountDownLatch(1);
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/dm/test/ModuleBeanFactoryPostProcessorTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/dm/test/ModuleBeanFactoryPostProcessorTests.java
index c1bc24d9..7d1b819b 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/dm/test/ModuleBeanFactoryPostProcessorTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/dm/test/ModuleBeanFactoryPostProcessorTests.java
@@ -58,7 +58,7 @@ public class ModuleBeanFactoryPostProcessorTests extends AbstractKernelIntegrati
signal.assertSuccessfulCompletionSignalled(5000);
- ServiceReference[] serviceReferences = this.context.getServiceReferences(ApplicationContext.class.getName(), "(Bundle-SymbolicName=org.eclipse.virgo.kernel.dmfragment.test.inbuilt)");
+ ServiceReference<?>[] serviceReferences = this.context.getServiceReferences(ApplicationContext.class.getName(), "(Bundle-SymbolicName=org.eclipse.virgo.kernel.dmfragment.test.inbuilt)");
assertNotNull(serviceReferences);
assertEquals(1, serviceReferences.length);
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/RegionTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/RegionTests.java
index 777ffada..eb668b1b 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/RegionTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgi/test/RegionTests.java
@@ -27,11 +27,11 @@ public class RegionTests extends AbstractKernelIntegrationTest {
@Test
public void testGetUserRegion() throws Exception {
- ServiceReference[] serviceReferences = lookupRegionServices("org.eclipse.virgo.region.user");
+ ServiceReference<?>[] serviceReferences = lookupRegionServices("org.eclipse.virgo.region.user");
assertRegion(serviceReferences);
}
- private void assertRegion(ServiceReference[] serviceReferences) {
+ private void assertRegion(ServiceReference<?>[] serviceReferences) {
assertEquals(1, serviceReferences.length);
Region userRegion = (Region) this.kernelContext.getService(serviceReferences[0]);
@@ -39,7 +39,7 @@ public class RegionTests extends AbstractKernelIntegrationTest {
assertNotNull(userRegion.getBundleContext());
}
- private ServiceReference[] lookupRegionServices(String name) throws InvalidSyntaxException {
+ private ServiceReference<?>[] lookupRegionServices(String name) throws InvalidSyntaxException {
return this.kernelContext.getServiceReferences(Region.class.getName(), String.format("(org.eclipse.virgo.kernel.region.name=%s)",name));
}
}
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/test/ClassLoadingHelperIntegrationTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/test/ClassLoadingHelperIntegrationTests.java
index 4b5f6d4f..205ee8a7 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/test/ClassLoadingHelperIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/osgicommand/helper/test/ClassLoadingHelperIntegrationTests.java
@@ -32,6 +32,7 @@ import org.osgi.service.packageadmin.PackageAdmin;
/**
* Class for integration testing {@link org.eclipse.virgo.kernel.osgicommand.helper.ClassLoadingHelper}
*/
+@SuppressWarnings("deprecation")
@RunWith(DmKernelTestRunner.class)
public class ClassLoadingHelperIntegrationTests extends AbstractKernelIntegrationTest {
private static final String SHELL_COMMANDS_BUNDLE_NAME = "org.eclipse.virgo.kernel.osgicommand";
@@ -56,8 +57,8 @@ public class ClassLoadingHelperIntegrationTests extends AbstractKernelIntegratio
super.setup();
// get osgicommand bundle
- ServiceReference reference = context.getServiceReference(PackageAdmin.class.getName());
- PackageAdmin packageAdmin = (PackageAdmin) context.getService(reference);
+ ServiceReference<PackageAdmin> reference = context.getServiceReference(PackageAdmin.class);
+ PackageAdmin packageAdmin = context.getService(reference);
Bundle[] bundles = packageAdmin.getBundles(SHELL_COMMANDS_BUNDLE_NAME, null);
assertNotNull("No bundles with symbolic name [" + SHELL_COMMANDS_BUNDLE_NAME + "] found in bundles set " + Arrays.toString(context.getBundles()),
bundles);
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/AbstractKernelIntegrationTest.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/AbstractKernelIntegrationTest.java
index 0c295d1c..ad8f4617 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/AbstractKernelIntegrationTest.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/AbstractKernelIntegrationTest.java
@@ -40,9 +40,9 @@ public abstract class AbstractKernelIntegrationTest {
@Before
public void setup() {
- ServiceReference serviceReference = this.context.getServiceReference(OsgiFramework.class.getName());
+ ServiceReference<OsgiFramework> serviceReference = this.context.getServiceReference(OsgiFramework.class);
if (serviceReference != null) {
- this.framework = (OsgiFramework) this.context.getService(serviceReference);
+ this.framework = this.context.getService(serviceReference);
}
Bundle bundle = this.context.getBundle(1);
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java
index 6d6fd16a..3e63d5c8 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterSignallingTests.java
@@ -34,8 +34,8 @@ public class StandardBundleStarterSignallingTests extends AbstractKernelIntegrat
@Before
public void before() {
- ServiceReference serviceReference = this.kernelContext.getServiceReference(BundleStarter.class.getName());
- this.monitor = (BundleStarter) this.kernelContext.getService(serviceReference);
+ ServiceReference<BundleStarter> serviceReference = this.kernelContext.getServiceReference(BundleStarter.class);
+ this.monitor = this.kernelContext.getService(serviceReference);
assertNotNull(this.monitor);
}
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterTests.java
index ac88ee96..ad809d39 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardBundleStarterTests.java
@@ -30,8 +30,8 @@ public class StandardBundleStarterTests extends AbstractKernelIntegrationTest {
@Before
public void before() {
- ServiceReference serviceReference = this.kernelContext.getServiceReference(BundleStarter.class.getName());
- this.monitor = (BundleStarter) this.kernelContext.getService(serviceReference);
+ ServiceReference<BundleStarter> serviceReference = this.kernelContext.getServiceReference(BundleStarter.class);
+ this.monitor = this.kernelContext.getService(serviceReference);
assertNotNull(this.monitor);
}
diff --git a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardKernelIntegrationTests.java b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardKernelIntegrationTests.java
index b17a824f..02b3dbd3 100644
--- a/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardKernelIntegrationTests.java
+++ b/org.eclipse.virgo.kernel.test/src/test/java/org/eclipse/virgo/kernel/test/StandardKernelIntegrationTests.java
@@ -24,7 +24,7 @@ public class StandardKernelIntegrationTests extends AbstractKernelIntegrationTes
@Test
public void testRunKernelBundle() throws Exception {
- ServiceReference serviceReference = context.getServiceReference(ApplicationDeployer.class.getName());
+ ServiceReference<ApplicationDeployer> serviceReference = context.getServiceReference(ApplicationDeployer.class);
assertNotNull("Application deployer service was not present", serviceReference);
}
}
diff --git a/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF b/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF
index a1bd2e8a..61bb386e 100644
--- a/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF
+++ b/org.eclipse.virgo.kernel.test/src/test/resources/META-INF/MANIFEST.MF
@@ -1,17 +1,16 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.virgo.kernel.concurrent.test;version="2.2.
- 0";uses:="org.eclipse.virgo.kernel.core,org.eclipse.virgo.kernel.test
- ,org.junit",org.eclipse.virgo.kernel.dm.test;version="2.2.0";uses:="o
- rg.eclipse.virgo.kernel.test,org.junit",org.eclipse.virgo.kernel.ffdc
+ 0";uses:="org.eclipse.virgo.kernel.test,org.junit",org.eclipse.virgo.
+ kernel.dm.test;version="2.2.0";uses:="org.eclipse.virgo.kernel.test,o
+ rg.junit",org.eclipse.virgo.kernel.ffdc.test;version="2.2.0";uses:="o
+ rg.eclipse.virgo.kernel.test,org.junit",org.eclipse.virgo.kernel.osgi
.test;version="2.2.0";uses:="org.eclipse.virgo.kernel.test,org.junit"
- ,org.eclipse.virgo.kernel.osgi.test;version="2.2.0";uses:="org.eclips
- e.virgo.kernel.test,org.junit",org.eclipse.virgo.kernel.osgicommand.h
- elper.test;version="2.2.0";uses:="org.eclipse.virgo.kernel.test,org.j
- unit,org.junit.runner",org.eclipse.virgo.kernel.test;version="2.2.0";
- uses:="org.eclipse.virgo.kernel.core,org.junit,org.junit.runner"
+ ,org.eclipse.virgo.kernel.osgicommand.helper.test;version="2.2.0";use
+ s:="org.eclipse.virgo.kernel.test,org.junit,org.junit.runner",org.ecl
+ ipse.virgo.kernel.test;version="2.2.0";uses:="org.eclipse.virgo.kerne
+ l.core,org.junit,org.junit.runner"
Bundle-ClassPath: .,quasi/simpleexporter.jar,quasi/simpleimporter.jar,
- QuickConsumer.jar,SlowService.jar,quasi/simpleexporter.jar,quasi/simp
- leimporter.jar,QuickConsumer.jar,SlowService.jar
+ QuickConsumer.jar,SlowService.jar
Bundle-Version: 2.2.0
Tool: Bundlor 1.0.0.RELEASE
Bundle-Name: Virgo Kernel Test
diff --git a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java
index e7a44ddc..d12ffb0b 100644
--- a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java
+++ b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/Activator.java
@@ -15,23 +15,14 @@ import java.io.IOException;
import java.util.Dictionary;
import java.util.HashSet;
import java.util.Hashtable;
-import java.util.Properties;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.eclipse.osgi.service.resolver.PlatformAdmin;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.Constants;
-import org.osgi.service.cm.Configuration;
-import org.osgi.service.cm.ConfigurationAdmin;
-import org.osgi.service.event.EventAdmin;
-import org.osgi.service.event.EventConstants;
-import org.osgi.service.event.EventHandler;
-import org.osgi.service.packageadmin.ExportedPackage;
-import org.osgi.service.packageadmin.PackageAdmin;
-
+import org.eclipse.virgo.kernel.core.Shutdown;
+import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
+import org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser;
import org.eclipse.virgo.kernel.install.artifact.ScopeServiceRepository;
import org.eclipse.virgo.kernel.module.ModuleContextAccessor;
import org.eclipse.virgo.kernel.osgi.framework.ImportExpander;
@@ -40,10 +31,6 @@ import org.eclipse.virgo.kernel.osgi.framework.OsgiFrameworkUtils;
import org.eclipse.virgo.kernel.osgi.framework.OsgiServiceHolder;
import org.eclipse.virgo.kernel.osgi.framework.PackageAdminUtil;
import org.eclipse.virgo.kernel.osgi.quasi.QuasiFrameworkFactory;
-import org.eclipse.virgo.osgi.extensions.equinox.hooks.MetaInfResourceClassLoaderDelegateHook;
-import org.eclipse.virgo.kernel.core.Shutdown;
-import org.eclipse.virgo.kernel.deployer.core.ApplicationDeployer;
-import org.eclipse.virgo.kernel.deployer.core.DeployUriNormaliser;
import org.eclipse.virgo.kernel.shim.scope.ScopeFactory;
import org.eclipse.virgo.kernel.userregion.internal.equinox.EquinoxHookRegistrar;
import org.eclipse.virgo.kernel.userregion.internal.equinox.EquinoxOsgiFramework;
@@ -56,8 +43,19 @@ import org.eclipse.virgo.kernel.userregion.internal.quasi.StandardQuasiFramework
import org.eclipse.virgo.kernel.userregion.internal.quasi.StandardResolutionFailureDetective;
import org.eclipse.virgo.medic.dump.DumpContributor;
import org.eclipse.virgo.medic.eventlog.EventLogger;
+import org.eclipse.virgo.osgi.extensions.equinox.hooks.MetaInfResourceClassLoaderDelegateHook;
import org.eclipse.virgo.repository.Repository;
import org.eclipse.virgo.util.osgi.ServiceRegistrationTracker;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.Constants;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.osgi.service.event.EventAdmin;
+import org.osgi.service.event.EventConstants;
+import org.osgi.service.event.EventHandler;
+import org.osgi.service.packageadmin.ExportedPackage;
+import org.osgi.service.packageadmin.PackageAdmin;
/**
* {@link BundleActivator} for the Equinox-specific OSGi integration
@@ -68,6 +66,7 @@ import org.eclipse.virgo.util.osgi.ServiceRegistrationTracker;
* Thread-safe.
*
*/
+@SuppressWarnings("deprecation")
public class Activator implements BundleActivator {
private static final long MAX_SECONDS_WAIT_FOR_SERVICE = 30;
diff --git a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java
index f1625702..be16c218 100644
--- a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java
+++ b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/EquinoxOsgiFramework.java
@@ -33,6 +33,7 @@ import org.eclipse.virgo.kernel.osgi.framework.support.AbstractOsgiFramework;
* Implementation of <code>OsgiFramework</code> using Equinox.
*
*/
+@SuppressWarnings("deprecation")
public class EquinoxOsgiFramework extends AbstractOsgiFramework {
private final OsgiServiceHolder<PlatformAdmin> platformAdmin;
diff --git a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/StandardPackageAdminUtil.java b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/StandardPackageAdminUtil.java
index 0a22db89..7846fa49 100644
--- a/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/StandardPackageAdminUtil.java
+++ b/org.eclipse.virgo.kernel.userregion/src/main/java/org/eclipse/virgo/kernel/userregion/internal/equinox/StandardPackageAdminUtil.java
@@ -28,6 +28,7 @@ import org.eclipse.virgo.kernel.osgi.framework.PackageAdminUtil;
* This class is thread safe.
*
*/
+@SuppressWarnings("deprecation")
public final class StandardPackageAdminUtil implements PackageAdminUtil {
private final PackageAdmin packageAdmin;
diff --git a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/ServiceScopingStrategyTests.java b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/ServiceScopingStrategyTests.java
index 4b21d1b5..162a8768 100644
--- a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/ServiceScopingStrategyTests.java
+++ b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/ServiceScopingStrategyTests.java
@@ -53,13 +53,13 @@ public class ServiceScopingStrategyTests {
private Scope globalScope;
- private ServiceReference unscopedServiceReference;
+ private ServiceReference<?> unscopedServiceReference;
private StubBundleContext unscopedBundleContext;
private Scope appScope;
- private ServiceReference scopedServiceReference;
+ private ServiceReference<?> scopedServiceReference;
private StubBundleContext scopedBundleContext;
@@ -235,22 +235,22 @@ public class ServiceScopingStrategyTests {
* This test uses a collection that does not support addition in order to place the
* same constraints on the implementation as the service registry find hook.
*/
- private final class ShrinkableSet extends HashSet<ServiceReference> {
+ private final class ShrinkableSet extends HashSet<ServiceReference<?>> {
private static final long serialVersionUID = 1L;
- public ShrinkableSet(ServiceReference e) {
+ public ShrinkableSet(ServiceReference<?> e) {
super();
super.add(e);
}
@Override
- public boolean add(ServiceReference e) {
+ public boolean add(ServiceReference<?> e) {
throw new UnsupportedOperationException();
}
@Override
- public boolean addAll(Collection<? extends ServiceReference> c) {
+ public boolean addAll(Collection<? extends ServiceReference<?>> c) {
throw new UnsupportedOperationException();
}
diff --git a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/equinox/AbstractOsgiFrameworkLaunchingTests.java b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/equinox/AbstractOsgiFrameworkLaunchingTests.java
index 44374583..9f1285ee 100644
--- a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/equinox/AbstractOsgiFrameworkLaunchingTests.java
+++ b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/equinox/AbstractOsgiFrameworkLaunchingTests.java
@@ -55,6 +55,7 @@ import org.eclipse.virgo.repository.RepositoryFactory;
import org.eclipse.virgo.repository.internal.RepositoryBundleActivator;
import org.eclipse.virgo.util.io.FileSystemUtils;
+@SuppressWarnings("deprecation")
public abstract class AbstractOsgiFrameworkLaunchingTests {
protected EquinoxOsgiFramework framework;
@@ -67,11 +68,11 @@ public abstract class AbstractOsgiFrameworkLaunchingTests {
private BundleContext bundleContext;
- private ServiceRegistration repositoryRegistration;
+ private ServiceRegistration<Repository> repositoryRegistration;
- private ServiceRegistration eventLoggerRegistration;
+ private ServiceRegistration<EventLogger> eventLoggerRegistration;
- private ServiceRegistration dumpGeneratorRegistration;
+ private ServiceRegistration<DumpGenerator> dumpGeneratorRegistration;
private Equinox equinox;
@@ -110,14 +111,14 @@ public abstract class AbstractOsgiFrameworkLaunchingTests {
final EventLogger mockEventLogger = new MockEventLogger();
- eventLoggerRegistration = bundleContext.registerService(EventLogger.class.getName(), mockEventLogger, null);
- dumpGeneratorRegistration = bundleContext.registerService(DumpGenerator.class.getName(), dumpGenerator, null);
+ eventLoggerRegistration = bundleContext.registerService(EventLogger.class, mockEventLogger, null);
+ dumpGeneratorRegistration = bundleContext.registerService(DumpGenerator.class, dumpGenerator, null);
this.repositoryBundleActivator = new RepositoryBundleActivator();
this.repositoryBundleActivator.start(bundleContext);
- ServiceReference serviceReference = bundleContext.getServiceReference(RepositoryFactory.class.getName());
- RepositoryFactory repositoryFactory = (RepositoryFactory) bundleContext.getService(serviceReference);
+ ServiceReference<RepositoryFactory> repositoryFactoryServiceReference = bundleContext.getServiceReference(RepositoryFactory.class);
+ RepositoryFactory repositoryFactory = bundleContext.getService(repositoryFactoryServiceReference);
Properties repositoryProperties = new Properties();
repositoryProperties.load(new FileReader(new File(getRepositoryConfigDirectory(), "repository.properties")));
@@ -130,13 +131,13 @@ public abstract class AbstractOsgiFrameworkLaunchingTests {
artifactBridges, null);
repository = bean.getObject();
- repositoryRegistration = bundleContext.registerService(Repository.class.getName(), repository, null);
+ repositoryRegistration = bundleContext.registerService(Repository.class, repository, null);
- serviceReference = bundleContext.getServiceReference(PlatformAdmin.class.getName());
- this.platformAdmin = (PlatformAdmin) bundleContext.getService(serviceReference);
+ ServiceReference<PlatformAdmin> platformAdminServiceReference = bundleContext.getServiceReference(PlatformAdmin.class);
+ this.platformAdmin = (PlatformAdmin) bundleContext.getService(platformAdminServiceReference);
- serviceReference = bundleContext.getServiceReference(PackageAdmin.class.getName());
- PackageAdmin packageAdmin = (PackageAdmin) bundleContext.getService(serviceReference);
+ ServiceReference<PackageAdmin> packageAdminServiceReference = bundleContext.getServiceReference(PackageAdmin.class);
+ PackageAdmin packageAdmin = (PackageAdmin) bundleContext.getService(packageAdminServiceReference);
ImportExpander importExpander = createImportExpander(packageAdmin);
TransformedManifestProvidingBundleFileWrapper bundleFileWrapper = new TransformedManifestProvidingBundleFileWrapper(importExpander);
diff --git a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/quasi/StubParameterised.java b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/quasi/StubParameterised.java
index 437fbdaa..19262f49 100644
--- a/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/quasi/StubParameterised.java
+++ b/org.eclipse.virgo.kernel.userregion/src/test/java/org/eclipse/virgo/kernel/userregion/internal/quasi/StubParameterised.java
@@ -18,14 +18,11 @@ import java.util.Map;
*/
public abstract class StubParameterised {
- @SuppressWarnings("unchecked")
- Map attributes = new HashMap();
+ Map<String, Object> attributes = new HashMap<String, Object>();
- @SuppressWarnings("unchecked")
- Map directives = new HashMap();
+ Map<String, Object> directives = new HashMap<String, Object>();
- @SuppressWarnings("unchecked")
- public Map getAttributes() {
+ public Map<String, Object> getAttributes() {
return this.attributes;
}
@@ -33,8 +30,7 @@ public abstract class StubParameterised {
return this.directives.get(key);
}
- @SuppressWarnings("unchecked")
- public Map getDirectives() {
+ public Map<String, Object> getDirectives() {
return this.directives;
}

Back to the top