On Sat, 2 Oct 2021 09:14:49 GMT, Andrey Turbanov <github.com+741251+turban...@openjdk.org> wrote:
> Flipping arguments of 'equals' method, allows simplifying boolean > expressions: now we can remove redundant null check before. Looks fine src/java.desktop/share/classes/javax/swing/JSplitPane.java line 1000: > 998: leftComponent = comp; > 999: index = -1; > 1000: } else if (JSplitPane.RIGHT.equals(constraints) || I do not think that calling the equals on some object is equivalent to calling the equals on String. Please check other cases for similar issues. ------------- PR: https://git.openjdk.java.net/jdk/pull/5794