This can simplify the code

Comment From: chenqimiao

@NathanQingyangXu Thank you for your pointing.

Comment From: stsypanov

@chenqimiao actually, the advice from javadoc is outdated, see https://github.com/openjdk/jdk/pull/1764