On Wed, 5 Jul 2023 17:39:49 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> Do you mean we could use `obj instanceof DecimalFormat other` in front of >> that 30-line `&&` expression, or that we could collapse the list to exactly >> what you wrote? >> >> Separately, `super.equals` already performs the class check; so enhanced >> `instanceof` could be used only as a syntactic sugar, but even then it won't >> decrease the line count: we trade one line for another very similar line. > > Just what I wrote; I agree its a toss up from lines of code and performance. > I spotted that style in other files and its just a question of style; your > choice. I see. We are likely on the same page. My guess is that you saw incomplete source in "Files changed" on GitHub. In reality, that return statement spans 30 lines. I was initially confused by that trailing semicolon in your suggestion; I thought you propose to remove everything but those three lines, hence my question. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/14752#discussion_r1253594304