wu-sheng commented on a change in pull request #5989:
URL: https://github.com/apache/skywalking/pull/5989#discussion_r546567476
##########
File path:
apm-sniffer/apm-sdk-plugin/thrift-plugin/src/main/java/org/apache/skywalking/apm/plugin/thrift/wrapper/ServerInProtocolWrapper.java
##########
@@ -81,6 +84,24 @@ public TField readFieldBegin() throws TException {
}
return readFieldBegin();
}
+ if (field.type == TType.STOP) {
+ boolean haveCreatedSpan =
+ (boolean)
ContextManager.getRuntimeContext().get(HAVE_CREATED_SPAN);
Review comment:
I think there is an NPE risk.
```suggestion
Boolean haveCreatedSpan =
ContextManager.getRuntimeContext().get(HAVE_CREATED_SPAN);
```
And you should check `haveCreatedSpan != null && !haveCreatedSpan`, agree?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]