You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by li...@apache.org on 2019/04/07 15:25:15 UTC

[incubator-skywalking] branch master updated: Fix clr receiver (#2456)

This is an automated email from the ASF dual-hosted git repository.

liuhaoyangzz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new c3cc3d2  Fix clr receiver (#2456)
c3cc3d2 is described below

commit c3cc3d2e56cab510a270f2292dc79f20ed7acee9
Author: Lemon <li...@hotmail.com>
AuthorDate: Sun Apr 7 23:25:08 2019 +0800

    Fix clr receiver (#2456)
---
 .../oap/server/receiver/clr/provider/handler/CLRSourceDispatcher.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/oap-server/server-receiver-plugin/skywalking-clr-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/clr/provider/handler/CLRSourceDispatcher.java b/oap-server/server-receiver-plugin/skywalking-clr-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/clr/provider/handler/CLRSourceDispatcher.java
index 62f4620..ec42cd8 100644
--- a/oap-server/server-receiver-plugin/skywalking-clr-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/clr/provider/handler/CLRSourceDispatcher.java
+++ b/oap-server/server-receiver-plugin/skywalking-clr-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/clr/provider/handler/CLRSourceDispatcher.java
@@ -18,6 +18,7 @@
 
 package org.apache.skywalking.oap.server.receiver.clr.provider.handler;
 
+import java.util.Objects;
 import org.apache.skywalking.apm.network.common.CPU;
 import org.apache.skywalking.apm.network.language.agent.CLRMetric;
 import org.apache.skywalking.apm.network.language.agent.ClrGC;
@@ -51,7 +52,7 @@ public class CLRSourceDispatcher {
     void sendMetric(int serviceInstanceId, long minuteTimeBucket, CLRMetric metric) {
         ServiceInstanceInventory serviceInstanceInventory = instanceInventoryCache.get(serviceInstanceId);
         int serviceId;
-        if (serviceInstanceInventory == null) {
+        if (Objects.nonNull(serviceInstanceInventory)) {
             serviceId = serviceInstanceInventory.getServiceId();
         } else {
             logger.warn("Can't found service by service instance id from cache, service instance id is: {}", serviceInstanceId);