8241710: NullPointerException while entering empty submenu with "arrow right" #161
Root Cause : A menu can have empty submenu. This was not checked while processing RIGHT arrow key.
Fix : Added the null check for submenu. Added a unit test case which fails without fix and passes with it.
kleopatra left a comment
Verified the fix: test is failing before and passing after.
See one inline comment (just noting my personal pref :).
And again me fighting the system (can't seem to review code parts that are not near a change, so doing here:
don't know when/if that's ever reached (could get there - an action handler on the region itself?), anyway, at other places with a similar pattern (f.i processRightKey) there's an explicit guard against a null submenu, don't know if the latter is over-caution - logic and code is rather .. well .. inter-twined ;)
aghaisas left a comment
Thanks for the quick test.
Well, you are part of the system :)
I have updated this now.
Yes. This code does not seem to be ideal, but, it has evolved and a lot of fixes have gone in. So rewriting is ruled out.
@aghaisas This change now passes all automated pre-integration checks. When the change also fulfills all project specific requirements, type
Since the source branch of this PR was last updated there have been 7 commits pushed to the
@aghaisas The following commits have been pushed to master since your change was applied:
Your commit was automatically rebased without conflicts.
Pushed as commit 231879a.