> On May 24, 2021, at 10:39 AM, Mark Sheppard <mshep...@openjdk.java.net> wrote: > > I could have used return directly in multiple places ... but my style > preference is a single exit point from a method
My preference is the opposite :-) I like the "early returns" coding style because I don't need to "keep state" while reviewing code; specially long methods (my brain is not as good as it used to be). In this case there is also over initialization of "s", (it does not need to be set to null), and because of the java flow control analysis deficiencies "s" cannot be declared to be "final". So getting rid of the variable makes a lot of sense to me (fewer lines of code and less complexity). Best, christos
signature.asc
Description: Message signed with OpenPGP