This is an automated email from the ASF dual-hosted git repository.

wu-sheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-java.git


The following commit(s) were added to refs/heads/main by this push:
     new 59237c4930 Fix the `SenderSendInterceptor` in the 
nutz-plugin/http-1.x-plugin to avoid NPE caused by the Response status (#815)
59237c4930 is described below

commit 59237c4930af046c47bf905e3106d2255a159c5d
Author: kxkxkxkxkx <[email protected]>
AuthorDate: Tue Jul 28 21:35:07 2026 +0800

    Fix the `SenderSendInterceptor` in the nutz-plugin/http-1.x-plugin to avoid 
NPE caused by the Response status (#815)
---
 CHANGES.md                                                              | 1 +
 .../skywalking/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..8b4e789c2f 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-plugins/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 class SenderSendInterceptor implements 
InstanceMethodsAroundInterceptor {
         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();

Reply via email to