On Wed, 14 Dec 2022 02:16:41 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> Naoto Sato has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Moved echo() to ConsoleImpl, clean-ups > > src/java.base/share/classes/java/io/ConsoleImpl.java line 306: > >> 304: if (cbuf == rcb) { >> 305: cbuf = grow(); >> 306: end = cbuf.length; > > Initially this looked like an unintentionally change of logic to me, but when > I see the current mainline code in IntelliJ, it does note that this > assignment is then never used and it's right - after assigning `end` here, it > never gets used and we ultimately end up with a `return` statement which is > independent of this `end` value. So this change looks fine. In fact, that was suggested by IntelliJ 🙂 ------------- PR: https://git.openjdk.org/jdk/pull/11615