You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ke...@apache.org on 2021/08/23 05:18:30 UTC
[skywalking] branch master updated: Fix NPE when OAP nodes
synchronize events with each other in cluster mode (#7531)
This is an automated email from the ASF dual-hosted git repository.
kezhenxu94 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push:
new 7b20645 Fix NPE when OAP nodes synchronize events with each other in cluster mode (#7531)
7b20645 is described below
commit 7b206458fe73b91ef320899697a576e6b0c994fc
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Mon Aug 23 13:18:21 2021 +0800
Fix NPE when OAP nodes synchronize events with each other in cluster mode (#7531)
---
CHANGES.md | 1 +
.../main/java/org/apache/skywalking/oap/server/core/source/Event.java | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/CHANGES.md b/CHANGES.md
index ee1ed23..dbe24b8 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -44,6 +44,7 @@ Release Notes.
* Add a new API to test log analysis language.
* Harden the security of Groovy-based DSL, MAL and LAL.
* Fix distinct in Service/Instance/Endpoint query is not working.
+* Fix NPE when OAP nodes synchronize events with each other in cluster mode.
#### UI
diff --git a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Event.java b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Event.java
index f985d08..52f5b9f 100644
--- a/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Event.java
+++ b/oap-server/server-core/src/main/java/org/apache/skywalking/oap/server/core/source/Event.java
@@ -18,6 +18,7 @@
package org.apache.skywalking.oap.server.core.source;
+import com.google.common.base.Strings;
import java.util.HashMap;
import java.util.Map;
import lombok.EqualsAndHashCode;
@@ -186,7 +187,7 @@ public class Event extends Metrics implements ISource, WithMetadata, LongValueHo
builder.addDataStrings(getName());
builder.addDataStrings(getType());
builder.addDataStrings(getMessage());
- builder.addDataStrings(getParameters());
+ builder.addDataStrings(Strings.nullToEmpty(getParameters()));
builder.addDataLongs(getStartTime());
builder.addDataLongs(getEndTime());