HwangRock commented on PR #5306: URL: https://github.com/apache/zeppelin/pull/5306#issuecomment-5009238358
@jongyoul Thanks for the catch — agreed the close path should never be able to reach `computeIfPresent(null, ...)`. Added the null guard and regression tests in 73906a1. One note from tracing the path: `NotebookSocket` initializes `user` to `StringUtils.EMPTY` in its constructor, so `onClose()` before the first message currently passes `""` rather than null, and a null principal cannot reach `addUserConnection` because ticket validation rejects it first. So the null case looks unreachable today, but `setUser` is public and the guard costs nothing, so guarding explicitly makes sense regardless. The tests cover both the close-before-user-assignment path (`""`) and the literal null case. -- 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]
