diff options
author | gjoranv <gv@verizonmedia.com> | 2022-08-31 14:11:38 +0200 |
---|---|---|
committer | gjoranv <gv@verizonmedia.com> | 2022-08-31 14:11:38 +0200 |
commit | f869fa7fc3fbce76bc19745201bb62484dfc8efe (patch) | |
tree | b8d8e622116ef172e43395f6c9671504f2a740d4 /container-core/src/main/java/com/yahoo/container/di/Osgi.java | |
parent | 60e7b087648bc3c5fa4c4a06ca75f740e176f9d5 (diff) |
Revert "Clean up bundles and allowed duplicates after a failed reconfig."
This reverts commit b0a398eaeadfaf12e31bcfef2e41892439db1149.
Diffstat (limited to 'container-core/src/main/java/com/yahoo/container/di/Osgi.java')
-rw-r--r-- | container-core/src/main/java/com/yahoo/container/di/Osgi.java | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/container-core/src/main/java/com/yahoo/container/di/Osgi.java b/container-core/src/main/java/com/yahoo/container/di/Osgi.java index 02f42fdb9b8..a3ebc909a6e 100644 --- a/container-core/src/main/java/com/yahoo/container/di/Osgi.java +++ b/container-core/src/main/java/com/yahoo/container/di/Osgi.java @@ -9,6 +9,7 @@ import org.osgi.framework.Bundle; import java.util.Collection; import java.util.Set; +import java.util.stream.Collectors; import static java.util.Collections.emptySet; @@ -16,8 +17,6 @@ import static java.util.Collections.emptySet; * This interface has default implementations of all methods, to allow using it * for testing, instead of mocking or a test implementation. * - * TODO: remove test code from this interface. - * * @author gjoranv * @author Tony Vaagenes * @author ollivir @@ -25,6 +24,7 @@ import static java.util.Collections.emptySet; public interface Osgi { default void installPlatformBundles(Collection<String> bundlePaths) { + //System.out.println("installPlatformBundles " + bundlePaths); } /** @@ -32,21 +32,12 @@ public interface Osgi { * and therefore should be scheduled for uninstalling. */ default Set<Bundle> useApplicationBundles(Collection<FileReference> bundles) { - return emptySet(); - } - - /** - * To be used when a new application generation fails, e.g. during component construction. - * Reverts all state related to application bundles to the previous generation. - * - * Returns the set of bundles that was exclusively used by the new generation, - * and therefore should be scheduled for uninstalling. - */ - default Collection<Bundle> revertApplicationBundles() { + //System.out.println("useBundles " + bundles.stream().map(Object::toString).collect(Collectors.joining(", "))); return emptySet(); } default Class<?> resolveClass(BundleInstantiationSpecification spec) { + //System.out.println("resolving class " + spec.classId); try { return Class.forName(spec.classId.getName()); } catch (ClassNotFoundException e) { @@ -55,6 +46,7 @@ public interface Osgi { } default Bundle getBundle(ComponentSpecification spec) { + //System.out.println("resolving bundle " + spec); return new MockBundle(); } } |