On Tue, 31 Aug 2021 18:54:18 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> Jakob Cornell has refreshed the contents of this pull request, and previous 
>> commits have been removed. The incremental views will show differences 
>> compared to the previous content of the PR.
>
> src/jdk.jdi/share/classes/com/sun/tools/example/debug/tty/TTY.java line 458:
> 
>> 456:                     int repeat = Integer.parseInt(cmd);
>> 457:                     String subcom = t.nextToken("");
>> 458:                     for (int r = 0; r < repeat; r += 1) {
> 
> Not sure why you made this change. The previous version seems more readable.

Oh, I'm much more used to the `for` loop approach as a do-n-times idiom.  I 
find the autoincrement/autodecrement operators needlessly unintuitive in 
general, and in this case it destroys the original value of `repeat`.  I can 
certainly revert this if OpenJDK uses the `while` idiom though.

-------------

PR: https://git.openjdk.java.net/jdk/pull/5290

Reply via email to