From 5ca4f9a397667f257ba82f001ed0c859f4616abb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Thu, 2 Nov 2023 16:56:48 +0100 Subject: [PATCH] Remove redundant type Parameters to reduce ecj warnings --- .../src/org/eclipse/core/internal/preferences/Activator.java | 2 +- .../org/eclipse/core/internal/registry/osgi/Activator.java | 2 +- .../osgi/tests/container/ModuleContainerUsageTest.java | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java index 4bb8d4ff702..263d9595386 100644 --- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java +++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/Activator.java @@ -75,7 +75,7 @@ public void start(BundleContext context) throws Exception { boolean shouldRegister = !"false".equalsIgnoreCase(context.getProperty(PROP_REGISTER_PERF_SERVICE)); //$NON-NLS-1$ if (shouldRegister) { preferencesService = bundleContext.registerService(IPreferencesService.class, - PreferencesService.getDefault(), new Hashtable()); + PreferencesService.getDefault(), new Hashtable<>()); osgiPreferencesService = bundleContext.registerService(org.osgi.service.prefs.PreferencesService.class, new OSGiPreferencesServiceManager(bundleContext), null); } diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java index c6514837ea6..0b53121613d 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/Activator.java @@ -147,7 +147,7 @@ public void startRegistry() throws CoreException { defaultRegistry = RegistryFactory.createRegistry(strategy, masterRegistryKey, userRegistryKey); registryRegistration = Activator.getContext().registerService(IExtensionRegistry.class.getName(), - defaultRegistry, new Hashtable()); + defaultRegistry, new Hashtable<>()); defaultProvider = new RegistryProviderOSGI(defaultRegistry); // Set the registry provider and specify this as a default registry: RegistryProviderFactory.setDefault(defaultProvider); diff --git a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/ModuleContainerUsageTest.java b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/ModuleContainerUsageTest.java index 169d91a72f0..0c2f869c936 100644 --- a/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/ModuleContainerUsageTest.java +++ b/bundles/org.eclipse.osgi.tests/src/org/eclipse/osgi/tests/container/ModuleContainerUsageTest.java @@ -139,7 +139,7 @@ public void end() { ModuleRevisionBuilder systemModuleBuilder = OSGiManifestBuilderFactory.createBuilder(getSystemManifest(), Constants.SYSTEM_BUNDLE_SYMBOLICNAME, systemPackages.toString(), systemEEs.toString()); Module systemBundle = container.install(null, Constants.SYSTEM_BUNDLE_LOCATION, systemModuleBuilder, - new AtomicReference()); + new AtomicReference<>()); executionEnvironments.addAll(systemBundle.getCurrentRevision() .getDeclaredCapabilities(ExecutionEnvironmentNamespace.EXECUTION_ENVIRONMENT_NAMESPACE)); @@ -180,7 +180,7 @@ private Map getSystemManifest() { Module installModule(ModuleContainer container, String bsn, String version, String imports, String eeReqs, List availableEEs) throws BundleException { ModuleRevisionBuilder builder = createModuleRevisionBuilder(bsn, version, imports, eeReqs); - Module m = container.install(null, bsn, builder, new AtomicReference()); + Module m = container.install(null, bsn, builder, new AtomicReference<>()); // Use a revision info that holds the EE_INDEX of the bundle based // on the EE capability that matches the modules EE requirement Collection eeBundleReqs = m.getCurrentRevision()