RFR: 8294456: Fix misleading-indentation warnings in JDK

Raffaello Giulietti rgiulietti at openjdk.org
Thu Sep 29 13:48:30 UTC 2022


On Thu, 29 Sep 2022 13:40:37 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>> This fixes misleading indentations, which allows enabling the (currently disabled) `misleading-indentation` warning flag on two `.gmk` files.
>
> src/java.base/share/native/libfdlibm/e_asin.c line 102:
> 
>> 100:             } else
>> 101:                 t = x*x;
>> 102:             p = t*(pS0+t*(pS1+t*(pS2+t*(pS3+t*(pS4+t*pS5)))));
> 
> should we add an opening brace after the `else` (and close it before line 102) to make it more obvious that there is no problem with the indentation?

It seems that this code is almost a verbatim copy of the upstream code available on the indicated link.
So, while I agree that it would be better to add braces, it would make the code diverge from the upstream source, even if the change would be benign. and welcome

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

PR: https://git.openjdk.org/jdk/pull/10487



More information about the build-dev mailing list