On Mon, 19 Oct 2020 20:49:14 GMT, Igor Ignatyev <[email protected]> wrote:
>> test/hotspot/jtreg/vmTestbase/nsk/jdb/caught_exception/caught_exception002/caught_exception002a.java
>> line 42:
>>
>>> 40: }
>>> 41:
>>> 42: public int runIt(String[] args, PrintStream out) {
>>
>> Is there a style guide that says this is the preferred way to declare an
>> array type? I count 3700 occurrences of
>> "String args[]" in ours tests.
>
> yes, there is, e.g. [Java Style
> Guidelines](http://cr.openjdk.java.net/~alundblad/styleguide/index-v6.html#toc-variable-declarations)
> by Andreas
> Lundblad:
>> Square brackets of arrays should be at the type (String[] args) and not on
>> the variable (String args[]).
>
> although @aioobe's guidelines have been accepted (yet?) to the openjdk guide
> (see openjdk/guide#14), this particular
> item is agreed on and accepted almost unanimously in the industry.
ok
-------------
PR: https://git.openjdk.java.net/jdk/pull/689