Java does not have a way to break out of an inner-nested if to the outer else. that really violates the idea of what a if-statement does. You are basically saying
The correct way to do it is to either
a) extract the common code to a method and call it from the two places
b) re-write your logic to something like
Note: I have not verified the above is the correct logic...I don't have time to make out a truth table.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors