From d201899936af77c2a6989fdec14524aaa8ba4918 Mon Sep 17 00:00:00 2001 From: gjoranv Date: Fri, 29 Oct 2021 10:04:03 +0200 Subject: Comment debug println and add class comment. --- container-core/src/main/java/com/yahoo/container/di/Osgi.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 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 39565756ac9..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 @@ -14,6 +14,9 @@ import java.util.stream.Collectors; 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. + * * @author gjoranv * @author Tony Vaagenes * @author ollivir @@ -21,7 +24,7 @@ import static java.util.Collections.emptySet; public interface Osgi { default void installPlatformBundles(Collection bundlePaths) { - System.out.println("installPlatformBundles " + bundlePaths); + //System.out.println("installPlatformBundles " + bundlePaths); } /** @@ -29,12 +32,12 @@ public interface Osgi { * and therefore should be scheduled for uninstalling. */ default Set useApplicationBundles(Collection bundles) { - System.out.println("useBundles " + bundles.stream().map(Object::toString).collect(Collectors.joining(", "))); + //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); + //System.out.println("resolving class " + spec.classId); try { return Class.forName(spec.classId.getName()); } catch (ClassNotFoundException e) { @@ -43,7 +46,7 @@ public interface Osgi { } default Bundle getBundle(ComponentSpecification spec) { - System.out.println("resolving bundle " + spec); + //System.out.println("resolving bundle " + spec); return new MockBundle(); } } -- cgit v1.2.3