servicemix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r916100 - /servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java
Date Thu, 25 Feb 2010 03:23:18 GMT
Author: ffang
Date: Thu Feb 25 03:23:17 2010
New Revision: 916100

URL: http://svn.apache.org/viewvc?rev=916100&view=rev
Log:
[SM-1926]  Statistics Service throws NPE with DynamicEndpoints

Modified:
    servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java

Modified: servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java
URL: http://svn.apache.org/viewvc/servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java?rev=916100&r1=916099&r2=916100&view=diff
==============================================================================
--- servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java
(original)
+++ servicemix/smx3/trunk/core/servicemix-core/src/main/java/org/apache/servicemix/jbi/monitoring/StatisticsService.java
Thu Feb 25 03:23:17 2010
@@ -232,7 +232,9 @@
                     if (EndpointSupport.getKey(ses[i]).equals(source)) {
                         source = EndpointSupport.getUniqueKey(ses[i]);
                         EndpointStats stats = endpointStats.get(source);
-                        stats.incrementOutbound();
+                        if (stats != null) {
+                            stats.incrementOutbound();
+                        }
                         break;
                     }
                 }
@@ -250,7 +252,9 @@
                 && me instanceof MessageExchangeImpl) {
             String source = EndpointSupport.getUniqueKey(me.getEndpoint());
             EndpointStats stats = endpointStats.get(source);
-            stats.incrementInbound();
+            if (stats != null) {
+                stats.incrementInbound();
+            }
         }        
     }
     



Mime
View raw message