You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by GitBox <gi...@apache.org> on 2019/04/05 00:50:32 UTC
[GitHub] [incubator-skywalking] wu-sheng commented on a change in pull
request #2450: Fix RabbitMq NPE case
wu-sheng commented on a change in pull request #2450: Fix RabbitMq NPE case
URL: https://github.com/apache/incubator-skywalking/pull/2450#discussion_r272415952
##########
File path: apm-sniffer/apm-sdk-plugin/rabbitmq-5.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/rabbitmq/RabbitMQConsumerInterceptor.java
##########
@@ -51,7 +51,11 @@ public void beforeMethod(EnhancedInstance objInst, Method method, Object[] allAr
CarrierItem next = contextCarrier.items();
while (next.hasNext()) {
next = next.next();
- next.setHeadValue(properties.getHeaders().get(next.getHeadKey()).toString());
+ if (properties != null) {
+ next.setHeadValue(properties.getHeaders().get(next.getHeadKey()).toString());
Review comment:
I think, you may still get NPE, when
1. Headers don't exist.
1. Key doesn't exist in header.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services