rombert commented on a change in pull request #2:
URL: 
https://github.com/apache/sling-org-apache-sling-discovery-oak/pull/2#discussion_r616531892



##########
File path: src/main/java/org/apache/sling/discovery/oak/OakDiscoveryService.java
##########
@@ -390,7 +390,16 @@ protected void bindPropertyProvider(final PropertyProvider 
propertyProvider,
                 propertyProvider);
 
         synchronized (lock) {
-            this.bindPropertyProviderInteral(propertyProvider, props);
+            try {
+                this.bindPropertyProviderInteral(propertyProvider, props);
+            } catch (RuntimeException re) {
+                // SLING-10204 : catch and instead log less noisy as this can 
legitimately happen
+                if (logger.isDebugEnabled()) {

Review comment:
       I am not sure if this is the right fix overall TBH, but if we end up 
going this way a better way (IMO) would be to log a WARN say something iike  
"enable debug logging" to see stack traces. Then you can just log them at debug 
level.
   
   This pattern is confusing (IMO) and should be avoided.




-- 
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:
us...@infra.apache.org


Reply via email to