Skip to content

Fix NPE in getSupervisorPageInfo for unknown hostnames#8442

Merged
rzo1 merged 1 commit intomasterfrom
fix/nimbus-supervisor-page-npe
Mar 28, 2026
Merged

Fix NPE in getSupervisorPageInfo for unknown hostnames#8442
rzo1 merged 1 commit intomasterfrom
fix/nimbus-supervisor-page-npe

Conversation

@jnioche
Copy link
Copy Markdown
Contributor

@jnioche jnioche commented Mar 28, 2026

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:

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

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jnioche jnioche added this to the 2.8.6 milestone Mar 28, 2026
@jnioche jnioche added the bug label Mar 28, 2026
@rzo1 rzo1 merged commit f911d30 into master Mar 28, 2026
12 checks passed
@jnioche jnioche deleted the fix/nimbus-supervisor-page-npe branch March 30, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants