提交 ea566b19 编写于 作者: 于玉桔 提交者: wu-sheng

Fix RabbitMq NPE case (#2450)

* Fix npe
上级 128a1190
......@@ -51,7 +51,11 @@ public class RabbitMQConsumerInterceptor implements InstanceMethodsAroundInterce
CarrierItem next = contextCarrier.items();
while (next.hasNext()) {
next = next.next();
next.setHeadValue(properties.getHeaders().get(next.getHeadKey()).toString());
if (properties.getHeaders() != null && properties.getHeaders().get(next.getHeadKey()) != null) {
next.setHeadValue(properties.getHeaders().get(next.getHeadKey()).toString());
} else {
next.setHeadValue("");
}
}
ContextManager.extract(contextCarrier);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册