diff options
author | gjoranv <gv@verizonmedia.com> | 2020-07-15 18:23:33 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2020-07-15 18:23:33 +0200 |
commit | a6d6fef475fe86b3357926d8c5f9d39721d72689 (patch) | |
tree | 15994b005370cf7880cf0dcea0848008fc9c80ef | |
parent | afa5a29be7d8416b8186d1f2045b379dd592f5ad (diff) |
Rename use -> useBundles
3 files changed, 7 insertions, 7 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java index 9501442cb9f..e20fbd7b2ae 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java @@ -48,7 +48,7 @@ public class ApplicationBundleLoader { * Installs the given set of bundles and returns the set of bundles that is no longer used * by the application, and should therefore be scheduled for uninstall. */ - public synchronized Set<Bundle> use(List<FileReference> newFileReferences) { + public synchronized Set<Bundle> useBundles(List<FileReference> newFileReferences) { Set<FileReference> obsoleteReferences = getObsoleteFileReferences(newFileReferences); Set<Bundle> bundlesToUninstall = getObsoleteBundles(obsoleteReferences); diff --git a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java index cf38e49497c..40470a9f096 100644 --- a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java +++ b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java @@ -143,7 +143,7 @@ public class HandlersConfigurerDi { @Override public Set<Bundle> useApplicationBundles(Collection<FileReference> bundles) { log.info("Installing bundles from the latest application"); - return applicationBundleLoader.use(new ArrayList<>(bundles)); + return applicationBundleLoader.useBundles(new ArrayList<>(bundles)); } } diff --git a/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java b/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java index fa3308bdbc3..ee71e8a8f4c 100644 --- a/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java +++ b/container-core/src/test/java/com/yahoo/container/core/config/ApplicationBundleLoaderTest.java @@ -36,7 +36,7 @@ public class ApplicationBundleLoaderTest { @Test public void bundles_are_installed_and_started() { - bundleLoader.use(List.of(BUNDLE_1_REF)); + bundleLoader.useBundles(List.of(BUNDLE_1_REF)); assertEquals(1, osgi.getInstalledBundles().size()); // The bundle is installed and started @@ -51,8 +51,8 @@ public class ApplicationBundleLoaderTest { @Test public void new_bundle_can_be_installed_in_reconfig() { - bundleLoader.use(List.of(BUNDLE_1_REF)); - Set<Bundle> obsoleteBundles = bundleLoader.use(List.of(BUNDLE_1_REF, BUNDLE_2_REF)); + bundleLoader.useBundles(List.of(BUNDLE_1_REF)); + Set<Bundle> obsoleteBundles = bundleLoader.useBundles(List.of(BUNDLE_1_REF, BUNDLE_2_REF)); // No bundles are obsolete assertTrue(obsoleteBundles.isEmpty()); @@ -76,8 +76,8 @@ public class ApplicationBundleLoaderTest { @Test public void unused_bundle_is_marked_obsolete_after_reconfig() { - bundleLoader.use(List.of(BUNDLE_1_REF)); - Set<Bundle> obsoleteBundles = bundleLoader.use(List.of(BUNDLE_2_REF)); + bundleLoader.useBundles(List.of(BUNDLE_1_REF)); + Set<Bundle> obsoleteBundles = bundleLoader.useBundles(List.of(BUNDLE_2_REF)); // The returned set of obsolete bundles contains bundle-1 assertEquals(1, obsoleteBundles.size()); |