sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: r1752368 - /sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
Date Wed, 13 Jul 2016 06:05:18 GMT
Author: cziegeler
Date: Wed Jul 13 06:05:18 2016
New Revision: 1752368

URL: http://svn.apache.org/viewvc?rev=1752368&view=rev
Log:
SLING-5839 : Implementation must not rely on SERVICE_PID

Modified:
    sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java

Modified: sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
URL: http://svn.apache.org/viewvc/sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java?rev=1752368&r1=1752367&r2=1752368&view=diff
==============================================================================
--- sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
(original)
+++ sling/trunk/bundles/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/util/HealthCheckMetadata.java
Wed Jul 13 06:05:18 2016
@@ -144,13 +144,11 @@ public class HealthCheckMetadata {
             name = PropertiesUtil.toString(ref.getProperty(Constants.SERVICE_DESCRIPTION),
null);
         }
         if (StringUtils.isBlank(name)) {
-            name = PropertiesUtil.toString(ref.getProperty(Constants.SERVICE_PID), null);
-            if ( !StringUtils.isBlank(name) ) {
-                name = name + " (" + ref.getProperty(Constants.SERVICE_ID) + ")";
-            }
-        }
-        if (StringUtils.isBlank(name)) {
             name = "HealthCheck:" + ref.getProperty(Constants.SERVICE_ID);
+            final String pid = PropertiesUtil.toString(ref.getProperty(Constants.SERVICE_PID),
null);
+            if ( !StringUtils.isBlank(pid) ) {
+                name = name + " (" + pid + ")";
+            }
         }
         return name;
     }



Mime
View raw message