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

Chris Plummer cjplummer at openjdk.java.net
Mon Oct 19 18:59:29 UTC 2020


On Thu, 15 Oct 2020 23:25:25 GMT, Igor Ignatyev <iignatyev at openjdk.org> wrote:

>> Hi all,
>> 
>> could you please review this patch which reformats/cleans up the code of vmTestbase/nsk/jdb tests?
>> 
>> the part of this patch is a spinoff from #350.
>> 
>> testing:
>> * [x] `vmTestbase/nsk/jdb` tests on `linux-x64-debug`
>
> Igor Ignatyev has updated the pull request incrementally with one additional commit since the last revision:
> 
>   update copyright years

I've gotten about halfway through. I'll wait for your responses before doing the rest since I don't want to keep
tagging the same issues.

test/hotspot/jtreg/vmTestbase/nsk/jdb/caught_exception/caught_exception002/caught_exception002.java line 87:

> 85:     static final String DEBUGGEE_CLASS = TEST_CLASS + "a";
> 86:     static final String FIRST_BREAK = DEBUGGEE_CLASS + ".main";
> 87:     static final String LAST_BREAK = DEBUGGEE_CLASS + ".lastBreak";

I'm not so sure I'd consider this change an improvement. Maybe remove some of the extra spaces but keep the alignment.

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.

test/hotspot/jtreg/vmTestbase/nsk/jdb/fields/fields001/fields001.java line 108:

> 106:             "ii_aa", "oi_aa",
> 107:             "ii_aaa", "oi_aaa"
> 108:     };

Why are these indented 8 instead of 4?

test/hotspot/jtreg/vmTestbase/nsk/jdb/hidden_class/hc001/hc001.java line 323:

> 321:                 "xx.yyy/0x111/0x222",
> 322:                 "xx./0x111.0x222",
> 323:                 "xx.yyy.zzz/"

Why are these indented 8 instead of 4?

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

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


More information about the serviceability-dev mailing list