sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [sling-org-apache-sling-junit-core] kwin commented on a change in pull request #1: [SLING-8246]Fix server side test hang with repeat "Waiting for the following bund…
Date Sun, 05 Jan 2020 12:34:14 GMT
kwin commented on a change in pull request #1: [SLING-8246]Fix server side test hang with repeat
"Waiting for the following bund…
URL: https://github.com/apache/sling-org-apache-sling-junit-core/pull/1#discussion_r363090108
 
 

 ##########
 File path: src/main/java/org/apache/sling/junit/impl/servlet/JacocoServlet.java
 ##########
 @@ -16,34 +16,49 @@
  */
 package org.apache.sling.junit.impl.servlet;
 
-import org.apache.felix.scr.annotations.Component;
-import org.apache.felix.scr.annotations.Property;
-import org.apache.felix.scr.annotations.Reference;
-import org.jacoco.agent.rt.IAgent;
-import org.osgi.service.component.ComponentContext;
-import org.osgi.service.http.HttpService;
-import org.osgi.service.http.NamespaceException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import java.io.IOException;
+import java.lang.management.ManagementFactory;
 
 import javax.management.MBeanServer;
 import javax.management.MBeanServerInvocationHandler;
 import javax.management.MalformedObjectNameException;
 import javax.management.ObjectName;
+import javax.servlet.Servlet;
 import javax.servlet.ServletException;
 import javax.servlet.http.HttpServlet;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.lang.management.ManagementFactory;
-import java.util.Dictionary;
 
+import org.jacoco.agent.rt.IAgent;
+import org.osgi.framework.Constants;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Modified;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.metatype.annotations.AttributeDefinition;
+import org.osgi.service.metatype.annotations.Designate;
+import org.osgi.service.metatype.annotations.ObjectClassDefinition;
+import org.osgi.service.http.HttpService;
+import org.osgi.service.http.NamespaceException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 /**
  * This servlet exposes JaCoCo code coverage data over HTTP. See {@link #EXPLAIN} for usage
information,
  * which is also available at /system/sling/jacoco after installing this servlet with the
default settings.
  */
 @SuppressWarnings("serial")
-@Component(immediate = true, metatype = true)
+@Component(
+    service = Servlet.class,
+    immediate = true,
+    configurationPolicy = ConfigurationPolicy.OPTIONAL,
+    property = {
+        Constants.SERVICE_DESCRIPTION+"=This servlet exposes JaCoCo (http://www.eclemma.org/jacoco)
code coverage data.",
+        "servlet.path=/system/sling/jacoco"
 
 Review comment:
   no need for that

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message