Hi Julia > On Nov 19, 2019, at 5:06 AM, Julia Boes <julia.b...@oracle.com> wrote: > > Hi Roger, Lance, > >>> If we're putting "public" on the same line as the method then >>> it seems useful to put the /* non-public */ on the same line too. >>> Though I don't know we have style guidance for that. >>> (And elsewhere too). >> Is the above common coding in the JDK? To me it seems to be more readable >> to have the comment above the method? >> >> If I run reformat in Intellij for example with code similar to the above, it >> will put /*non-public*/ on its own line. >> >> Before reformat: >> >> —————— >> /*non-public*/ static void foo(String f1) { >> System.out.printf("hello %s%n", f1); >> } >> ————————— >> After reformat: >> ————— >> /*non-public*/ >> static void foo(String f1) { >> System.out.printf("hello %s%n", f1); >> } >> —————— > > Looking at the existing code base, the same-line version is slightly more > common (57 of 100). I would lean on the side of consistency and stick to the > same-line version unless there are any objections. > > Updated webrev: http://cr.openjdk.java.net/~jboes/webrevs/8234335/webrev.01/
Seems to be a “your milage varies”. I am fine with whatever the final decision is. However, I do believe the comment above reads better and aligns the methods better. Best Lance > > > Regards, > > Julia > > <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif> <http://oracle.com/us/design/oracle-email-sig-198324.gif>Lance Andersen| Principal Member of Technical Staff | +1.781.442.2037 Oracle Java Engineering 1 Network Drive Burlington, MA 01803 lance.ander...@oracle.com <mailto:lance.ander...@oracle.com>