On Thu, 29 May 2025 03:06:25 GMT, Bradford Wetmore <wetm...@openjdk.org> wrote:

>> Could you please post a link to the guide where it says so? I've found a 
>> couple of Oracle examples and both use different switch/case levels:
>> 
>> 1. https://docs.oracle.com/javase/tutorial/java/nutsandbolts/switch.html
>> 2. 
>> https://docs.oracle.com/en/java/javase/17/language/switch-expressions-and-statements.html
>> 
>> Also, I couldn't find a single occurrence of the same switch/case level in 
>> our SSL code. `SSLKeyExchange.java` for example has multiple switch/case 
>> statement - all indented.
>
> This isn't a big deal, and I'm ok with way.   I probably wouldn't have 
> mentioned it in new code (Xuelei was apparently a fan :) ), but it was 
> surprising to see you change the existing switch indention style in two 
> places in this test.
> 
> See the PDF [Java Coding 
> Conventions](https://www.google.com/url?sa=t&source=web&rct=j&opi=89978449&url=https://www.oracle.com/docs/tech/java/codeconventions.pdf&ved=2ahUKEwiNqLPMz8eNAxVXJDQIHY33NrEQFnoECBkQAQ&usg=AOvVaw0D2xdWb0D3hvB-nDkKWcU9),
>  section 7.8 on Page 13.
> 
> My personal preference is as doc'd, as it reduces the indention creep by 1 
> level and gives more vertical room for code before hitting the recommended 80 
> char/line max.  
> 
> If you Yah-oogl-ing  (combo of Yahoo/Google/Bing :) ), you might [find the 
> newer HTML 
> version](https://www.oracle.com/java/technologies/javase/codeconventions-contents.html),
>  but the spacing in the article is completely broken!

I see, thanks! It's good to have a PDF version as HTML version's indentation is 
simply missing (as you have mentioned). I'll restore the original indentation 
then, it was done automatically by IntelliJ.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25310#discussion_r2114053130

Reply via email to