Aias00 opened a new issue, #6883: URL: https://github.com/apache/shenyu/issues/6883
## Description `responseContentLength` is a boxed `Integer` (default null). For a byte-type response with no `Content-Length` header (chunked/streamed), it stays null. When desensitization is enabled, `desensitizeShenyuRequestLog` calls `.toString()` on the null boxed value → NPE. Same unguarded `.toString()` pattern on `status` (`:192`) and `upstreamResponseTime` (`:195`). ## Location - `shenyu-plugin/shenyu-plugin-logging/shenyu-plugin-logging-common/src/main/java/org/apache/shenyu/plugin/logging/common/collector/AbstractLogCollector.java:189-190,192,194-195` ## Impact NPE thrown inside `doFinally` on the request thread for desensitization-enabled + byte-type chunked responses; that log lost. ## Suggested fix Null-guard before `.toString()` (e.g. `String.valueOf(logInfo.getResponseContentLength())`). ## Related existing None. -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
