incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1520588 - in /sling/trunk/contrib/extensions/healthcheck: core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java samples/src/main/java/org/apache/sling/hc/samples/impl/OsgiScriptBindingsProvider.java
Date Fri, 06 Sep 2013 14:51:04 GMT
Author: bdelacretaz
Date: Fri Sep  6 14:51:04 2013
New Revision: 1520588

URL: http://svn.apache.org/r1520588
Log:
SLING-3034 - avoid NPE

Modified:
    sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
    sling/trunk/contrib/extensions/healthcheck/samples/src/main/java/org/apache/sling/hc/samples/impl/OsgiScriptBindingsProvider.java

Modified: sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java?rev=1520588&r1=1520587&r2=1520588&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
(original)
+++ sling/trunk/contrib/extensions/healthcheck/core/src/main/java/org/apache/sling/hc/core/impl/JmxScriptBindingsProvider.java
Fri Sep  6 14:51:04 2013
@@ -78,6 +78,7 @@ public class JmxScriptBindingsProvider i
         final Object resultLog = b.get(logBindingName);
         if(resultLog == null) {
             log.info("No {} found in Bindings, cannot activate {} binding", logBindingName,
JMX_BINDING_NAME);
+            return;
         }
         try {
             b.put("jmx", new AttributeBinding(jmxServer, (FormattingResultLog)resultLog));

Modified: sling/trunk/contrib/extensions/healthcheck/samples/src/main/java/org/apache/sling/hc/samples/impl/OsgiScriptBindingsProvider.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/healthcheck/samples/src/main/java/org/apache/sling/hc/samples/impl/OsgiScriptBindingsProvider.java?rev=1520588&r1=1520587&r2=1520588&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/healthcheck/samples/src/main/java/org/apache/sling/hc/samples/impl/OsgiScriptBindingsProvider.java
(original)
+++ sling/trunk/contrib/extensions/healthcheck/samples/src/main/java/org/apache/sling/hc/samples/impl/OsgiScriptBindingsProvider.java
Fri Sep  6 14:51:04 2013
@@ -102,6 +102,7 @@ public class OsgiScriptBindingsProvider 
         final Object resultLog = b.get(logBindingName);
         if(resultLog == null) {
             log.info("No {} found in Bindings, cannot activate {} binding", logBindingName,
OSGI_BINDING_NAME);
+            return;
         }
         try {
             b.put("osgi", new OsgiBinding(bundleContext, (FormattingResultLog)resultLog));



Mime
View raw message