You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by GitBox <gi...@apache.org> on 2021/11/17 17:42:08 UTC

[GitHub] [sling-org-apache-sling-testing-osgi-mock] stefanseifert commented on a change in pull request #11: SLING-10922 don't consider DS metadata/CA for plain OSGi service

stefanseifert commented on a change in pull request #11:
URL: https://github.com/apache/sling-org-apache-sling-testing-osgi-mock/pull/11#discussion_r751481635



##########
File path: core/src/main/java/org/apache/sling/testing/mock/osgi/context/OsgiContextImpl.java
##########
@@ -133,75 +133,73 @@ private void registerDefaultServices() {
     }
 
     /**
-     * Injects dependencies, activates and registers a service in the mocked OSGi environment.
-     * @param <T> Service type
-     * @param service Service instance
-     * @return Registered service instance
+     * Injects dependencies, activates and registers a DS component in the mocked OSGi environment.
+     * Construction injection for OSGi services is supported.
+     * @param <T> DS Component type
+     * @param component a DS component instance
+     * @return the DS component instance
      */
-    public final @NotNull <T> T registerInjectActivateService(@NotNull final T service) {
-        return registerInjectActivateService(service, (Map<String,Object>)null);
+    public final @NotNull <T> T registerInjectActivateService(@NotNull final T component) {

Review comment:
       i would prefer updating the comments if required than renaming the method - the name is a bit awkward but used in nearly every unit test over all those years, it think there is no benefit renaming it now (although i like the simplicity of "setupDsComponent")




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@sling.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org