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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to