From 9c2aac2d262e13dfe5b404267980b1b0e54db616 Mon Sep 17 00:00:00 2001 From: 96loveslife <96loveslife@gmail.com> Date: Fri, 24 Jul 2026 12:02:04 +0800 Subject: [PATCH] Fix the `SenderSendInterceptor` in the nutz-plugin/http-1.x-plugin to avoid NPE caused by the Response status --- CHANGES.md | 1 + .../apm/plugin/nutz/http/sync/SenderSendInterceptor.java | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 4daf294f74..0404d72d07 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -32,6 +32,7 @@ Release Notes. * Fix an issue where `JDBCPluginConfig.Plugin.JDBC.SQL_BODY_MAX_LENGTH` was not honored by clickhouse-0.3.1 and clickhouse-0.3.2.x plugins. - Add tracing support for vector-store retrieval operations. * Fix agent lifecycle events: the Start event now carries the service instance name, and the Shutdown event is delivered on graceful JVM exit. `ServiceManager` prepares/starts higher-priority `BootService`s first and shuts them down last (matching `BootService#priority()`), and the shutdown event refreshes its gRPC deadline before sending. +* Fix the `SenderSendInterceptor` in the nutz-plugin/http-1.x-plugin to avoid NPE caused by the Response status. All issues and pull requests are [here](https://github.com/apache/skywalking/milestone/249?closed=1) diff --git a/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java b/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java index 3f2bffaccb..2c8e52bdee 100644 --- a/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java +++ b/apm-sniffer/apm-sdk-plugin/nutz-plugins/http-1.x-plugin/src/main/java/org/apache/skywalking/apm/plugin/nutz/http/sync/SenderSendInterceptor.java @@ -65,7 +65,7 @@ public Object afterMethod(final EnhancedInstance objInst, final Method method, f Response response = (Response) ret; AbstractSpan span = ContextManager.activeSpan(); - if (response == null) { + if (response != null) { Tags.HTTP_RESPONSE_STATUS_CODE.set(span, response.getStatus()); if (response.getStatus() >= 400) { span.errorOccurred();