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
This commit is contained in:
parent
c3de8e8b7c
commit
bc0c25ad55
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue