提交 bc0c25ad 编写于 作者: T tzy1316106836 提交者: wu-sheng

the static paramater is best to be referenced by the class (#2868)

* fix potential NullPointerException

* Revert "fix potential NullPointerException"

This reverts commit 8393656

* fix potential NullPointerException
the static paramater is best to use the class to reference
上级 c3de8e8b
......@@ -175,7 +175,7 @@ public class K8sALSServiceMeshHTTPAnalysis implements ALSHTTPAnalysis {
if (request != null) {
endpoint = request.getPath();
String schema = request.getScheme();
if (schema.equals("http") || schema.equals("https")) {
if ("http".equals(schema) || "https".equals(schema)) {
protocol = Protocol.HTTP;
} else {
protocol = Protocol.gRPC;
......@@ -278,7 +278,7 @@ public class K8sALSServiceMeshHTTPAnalysis implements ALSHTTPAnalysis {
if (request != null) {
endpoint = request.getPath();
String schema = request.getScheme();
if (schema.equals("http") || schema.equals("https")) {
if ("http".equals(schema) || "https".equals(schema)) {
protocol = Protocol.HTTP;
} else {
protocol = Protocol.gRPC;
......
......@@ -275,7 +275,7 @@ public class SegmentParse {
segmentParse.setStandardizationWorker(standardizationWorker);
boolean parseResult = segmentParse.parse(bufferData, Source.Buffer);
if (parseResult) {
segmentParse.TRACE_BUFFER_FILE_OUT.inc();
TRACE_BUFFER_FILE_OUT.inc();
}
return parseResult;
......
......@@ -275,7 +275,7 @@ public class SegmentParseV2 {
segmentParse.setStandardizationWorker(standardizationWorker);
boolean parseResult = segmentParse.parse(bufferData, SegmentSource.Buffer);
if (parseResult) {
segmentParse.TRACE_BUFFER_FILE_OUT.inc();
TRACE_BUFFER_FILE_OUT.inc();
}
return parseResult;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册