RFR: 8254861: reformat code in vmTestbase/nsk/jdb [v2]

Igor Ignatyev iignatyev at openjdk.java.net
Mon Oct 19 20:52:15 UTC 2020


On Mon, 19 Oct 2020 18:44:56 GMT, Chris Plummer <cjplummer at openjdk.org> wrote:

>> Igor Ignatyev has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   update copyright years
>
> 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.

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

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


More information about the serviceability-dev mailing list