aboutsummaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/container/core
diff options
context:
space:
mode:
authorgjoranv <gv@verizonmedia.com>2022-09-01 08:44:48 +0200
committergjoranv <gv@verizonmedia.com>2022-09-01 08:44:48 +0200
commita80b63f0f65b5d44444b4c47ee7803808b0fe8c6 (patch)
tree2ec904ed71a7207eec2ed3d2423a13f32ca9248f /container-core/src/main/java/com/yahoo/container/core
parent7973264e277d7ddffe69a4e5ac611c11b0693595 (diff)
Reapply "Set duplicate bundles to the set of bundles from the failed generation."
This reverts commit c5d3f1d34c8dc637cc3cc38a8d3a246d3f32ce66.
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/core')
-rw-r--r--container-core/src/main/java/com/yahoo/container/core/config/ApplicationBundleLoader.java6
1 files changed, 4 insertions, 2 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 972d6677e3b..1e30b19a48d 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
@@ -71,8 +71,10 @@ public class ApplicationBundleLoader {
bundlesFromNewGeneration.forEach(reference2Bundle::remove);
Collection<Bundle> ret = bundlesFromNewGeneration.values();
- // No duplicate bundles should be allowed until the next call to useBundles.
- osgi.allowDuplicateBundles(Set.of());
+ // For correct operation of the CollisionHook (more specifically its FindHook implementation), the set of
+ // allowed duplicates must reflect the next set of bundles to uninstall, which is now the bundles from the
+ // failed generation.
+ osgi.allowDuplicateBundles(ret);
// Clear restore info in case this method is called multiple times, for some reason.
bundlesFromNewGeneration = Map.of();