On Mon, 19 Oct 2020 23:56:00 GMT, Chris Plummer <cjplum...@openjdk.org> wrote:

>> b/c you get indentation unit for each block,  1st block is `fields001` class 
>> definition, next block is the array
>> initializations (start at L#86 and L#99 for `checkedFields1` and 
>> `checkedFields2` respecitively)
>
> I don't follow. You seem to have added an extra 4 (after having already 
> indented 4 extra spaces) simply because it is
> an array initialization. Why is the indentation any different than it would 
> be for something like a "for" loop block.
> The body of the block is indented 4 spaces more than the "for" statement.  
> For the static initialization the body of
> that "static" block should be indented 4 more than the "static" statement. I 
> don't see anything in the style guide that
> would indicate otherwise.

oh, sorry, it appears I was trying to explain the new code while looking at the 
old one...

full disclaimer, which I thought was obvious, the vast majority of the changes 
here aren't done by me, they are done by
auto-formatter, or more precisely by IntelliJ IDEA's formatter. IDEA doesn't 
consider array initialization as a new
block, and what's actually at play here is an indent for statement continuation 
(which is 2x of regular indent).

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

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

Reply via email to