RFR: JDK-8183372 : Refactor java/lang/Class shell tests to java [v3]
Mahendra Chhipa
github.com+34924738+mahendrachhipa at openjdk.java.net
Wed Jan 27 22:20:48 UTC 2021
On Tue, 26 Jan 2021 23:25:03 GMT, Florent Guillaume <github.com+592810+efge at openjdk.org> wrote:
>> Mahendra Chhipa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Implemented the review comments.
>
> test/jdk/java/lang/Class/forName/NonJavaNames.java line 67:
>
>> 65: @BeforeClass
>> 66: public void createInvalidNameClasses() throws IOException {
>> 67: Path hyphenPath = Paths.get(TEST_SRC + "hyphen.class");
>
> Building a `Path` with string concatenation is an anti-pattern.
> Also `Path.of` is probably preferred instead of `Paths.get`.
Now not doing the concatenation of the strings to create Path.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2170
More information about the core-libs-dev
mailing list