You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "Aias00 (via GitHub)" <gi...@apache.org> on 2026/08/03 01:10:08 UTC
[I] [BUG] InstanceCheckService doCheck / collectStateData NPE on null instanceState (autoboxing) [shenyu]
Aias00 opened a new issue, #6706:
URL: https://github.com/apache/shenyu/issues/6706
- severity: Medium
- files: `shenyu-admin/src/main/java/org/apache/shenyu/admin/service/impl/InstanceCheckService.java:145-167, 206-211, 213-243`
- description: `instance.getInstanceState()` is an `Integer`. `doCheck` uses `InstanceStatusEnum.ONLINE.getCode() == instance.getInstanceState()` — when `getCode()` is `int`, the `Integer` is unboxed; if `instanceState` is null this is an NPE. `collectStateData` (208) and `getInstanceDataVisual` (219) also use `Collectors.groupingBy(InstanceInfoVO::getInstanceState, ...)` which throws NPE on null keys.
- impact: A single instance with null state crashes the scheduled `doCheck` (caught and logged, so all instance state tracking silently stalls for that cycle).
- suggested_fix: Normalize null state to a default code when loading; guard unboxing with explicit null checks.
- confidence: Medium
- related_existing: none.
---
_Identified during the 2026-08-02 deep re-scan; full list in [`docs/scan2-2026-08-02/06-medium-tiers.md`](docs/scan2-2026-08-02/06-medium-tiers.md)._
--
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: notifications-unsubscribe@shenyu.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] InstanceCheckService doCheck / collectStateData NPE on null instanceState (autoboxing) [shenyu]
Posted by "moremind (via GitHub)" <gi...@apache.org>.
moremind closed issue #6706: [BUG] InstanceCheckService doCheck / collectStateData NPE on null instanceState (autoboxing)
URL: https://github.com/apache/shenyu/issues/6706
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [BUG] InstanceCheckService doCheck / collectStateData NPE on null instanceState (autoboxing) [shenyu]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6706:
URL: https://github.com/apache/shenyu/issues/6706#issuecomment-5161304357
👋 Hello @Aias00
A new issue has been opened by @Aias00:
- **Title**: [BUG] InstanceCheckService doCheck / collectStateData NPE on null instanceState (autoboxing)
- **Link**: https://github.com/apache/shenyu/issues/6706
Please review when you have time. Thank you! 🙏
--
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: notifications-unsubscribe@shenyu.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org