On Tue, 13 Feb 2024 06:50:29 GMT, vtstydev <d...@openjdk.org> wrote:

>> test/jdk/java/awt/print/PrinterJob/ImagePrinting/AlphaPrintingOffsets.java 
>> line 155:
>> 
>>> 153: }
>>> 154: 
>>> 155: class CustomPrintable implements Printable {
>> 
>> I suggest making `CustomPrintable` a static nested class in 
>> `AlphaPrintingOffsets`.
>> 
>> It avoids conflicts when you mark a folder as test sources in an IDE; if 
>> another test has a top-level class with the same name, `CustomPrintable`, 
>> compilation of test sources fails because of duplicate class.
>> 
>> It does not affect jtreg though, so it's just a suggestion.
>
> There are many tests in 
> [test/jdk/java/awt/print/PrinterJob/](https://github.com/openjdk/jdk/pull/17030/files/47b2222c4485c9a864cf0768b1ef90994a7a0064#diff-1af99936becca05c3422255acc1c800c3044b444fdf7bf9a074b3f166306bde1)
>  where side classes are not nested. I am badly familiar with nuances of 
> project. You know better how it be more convenient. I will do it if you 
> insist.

This is exactly the reason why I find it *inconvenient*. Therefore I'd rather 
not add add another test case which could make it worse.

Yet there are no strict rules that prescribe one way over the other. I'm not 
insisting.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/17030#discussion_r1487534298

Reply via email to