mreutegg commented on code in PR #6:
URL: 
https://github.com/apache/sling-org-apache-sling-discovery-impl/pull/6#discussion_r1753308769


##########
src/main/java/org/apache/sling/discovery/impl/TopologyWebConsolePlugin.java:
##########
@@ -63,23 +56,31 @@
 import 
org.apache.sling.discovery.commons.providers.spi.base.ClusterSyncHistory;
 import org.apache.sling.discovery.commons.providers.spi.base.SyncTokenService;
 import org.osgi.framework.BundleContext;
+import org.osgi.service.component.annotations.Activate;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.osgi.service.component.propertytypes.ServiceDescription;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static org.apache.felix.webconsole.WebConsoleConstants.PLUGIN_LABEL;
+import static org.apache.felix.webconsole.WebConsoleConstants.PLUGIN_TITLE;
+
 /**
  * Simple webconsole which gives an overview of the topology visible by the
  * discovery service
  */
-@Component
-@Service(value = { TopologyEventListener.class, Servlet.class })
-@Properties({
-    @Property(name=org.osgi.framework.Constants.SERVICE_DESCRIPTION,
-            value="Apache Sling Web Console Plugin to display Background 
servlets and ExecutionEngine status"),
-    @Property(name=WebConsoleConstants.PLUGIN_LABEL, 
value=TopologyWebConsolePlugin.LABEL),
-    @Property(name=WebConsoleConstants.PLUGIN_TITLE, 
value=TopologyWebConsolePlugin.TITLE),
-    @Property(name="felix.webconsole.category", value="Sling"),
-    @Property(name="felix.webconsole.configprinter.modes", value={"zip"})
-})
+@Component(
+        service = { TopologyEventListener.class, Servlet.class },
+        property = {
+                PLUGIN_LABEL + "=" + TopologyWebConsolePlugin.LABEL,
+                PLUGIN_TITLE + "=" + TopologyWebConsolePlugin.TITLE,
+                "felix.webconsole.category=Sling",
+                "felix.webconsole.configprinter.modes={zip}"

Review Comment:
   Can you explain why? The sibling class in discovery.oak does the same:
   
https://github.com/apache/sling-org-apache-sling-discovery-oak/blob/181a2a7f4efb87ae4bb4eaa5bced92e9485774d4/src/main/java/org/apache/sling/discovery/oak/TopologyWebConsolePlugin.java#L80



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