RFR: 8283664: Remove jtreg tag manual=yesno for java/awt/print/PrinterJob/PrintTextTest.java [v2]

Daniel Gredler duke at openjdk.org
Tue Nov 5 17:41:07 UTC 2024


On Tue, 5 Nov 2024 16:44:14 GMT, Alexey Ivanov <aivanov at openjdk.org> wrote:

>> Daniel Gredler has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Update copyright year, imports, array style, frame title
>
> test/jdk/java/awt/print/PrinterJob/PrintTextTest.java line 1:
> 
>> 1: /*
> 
> Could you make the `PrintJAText` class a nested static class inside `PrintTextTest`?
> 
> Yes, it requires more refactoring but this ensures no duplicate class names.
> 
> Since `PrintJAText` extends `PrintTextTest`, I suggest moving all the painting logic into `PrintText` class which will be a nested static class. Then `PrintJAText` (renamed to `PrintJapaneseText` if I understand the intent correctly) will extend `PrintText`.
> 
> All the other logic will remain unchanged.
> 
> Separating the painting logic from the test class itself, I believe, would also make thing clearer.
> 
> 
> In addition to the above, let's resolve IDE warnings at lines 349 and 411 (in the current revision):
> 
> 
> -        byte data[] = new byte[s.length()];
> +        byte[] data = new byte[s.length()];
> 
> -        TextLayout tl = new TextLayout(s, new HashMap(), frc);
> +        TextLayout tl = new TextLayout(s, new HashMap<>(), frc);
> 
> 
> Overall, the changes look good to me. Thank you for your contribution.

Thanks! Let me know if this last commit is what you had in mind. It might be easier to review with whitespace ignored, since the class additions required some indentation changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21716#discussion_r1829763803


More information about the client-libs-dev mailing list