jnioche opened a new pull request, #8442: URL: https://github.com/apache/storm/pull/8442
## Summary
Fix a `NullPointerException` in `Nimbus.getSupervisorPageInfo()` when
querying by a hostname with no supervisor registered in the cluster.
## Bug
`getSupervisorPageInfo` is called by the Storm UI's `/api/v1/supervisor`
endpoint. When `superId` is null (query by hostname), `hostToSuperId.get(host)`
returns `null` for unknown hosts. The subsequent for-each loop dereferences it:
```java
supervisorIds = hostToSuperId.get(host); // null if host not in cluster
// ...
for (String sid : supervisorIds) { // NPE
```
This is easily triggered by bookmarked URLs for decommissioned supervisors
or hostname typos.
## Fix
Guard against null with Collections.emptyList(), returning an empty
SupervisorPageInfo instead of crashing
🤖 Generated with Claude Code
--
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]
