Skip to content

Commit

Permalink
the static paramater is best to be referenced by the class (apache#2868)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
tzy1316106836 authored and wu-sheng committed Jun 13, 2019
1 parent c3de8e8 commit bc0c25a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ protected List<Source> analysisSideCar(StreamAccessLogsMessage.Identifier identi
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;
Expand Down Expand Up @@ -278,7 +278,7 @@ protected void analysisProxy(StreamAccessLogsMessage.Identifier identifier,
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public void send(UpstreamSegment segment, Source source) {
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public void send(UpstreamSegment segment, SegmentSource source) {
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;
Expand Down

0 comments on commit bc0c25a

Please sign in to comment.