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/16 18:40:08 UTC

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

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



##########
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:
       The name is a bit weird as this may potentially register multiple services but I guess it is too late now to change that. Maybe we can deprecate these method names and instead introduce `injectActivateRegisterComponent` (because in fact service registration happens after calling activate). WDYT @stefanseifert 




-- 
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