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

Alexey Ivanov aivanov at openjdk.org
Tue Nov 5 21:10:30 UTC 2024


On Tue, 5 Nov 2024 18:52:30 GMT, Daniel Gredler <duke at openjdk.org> wrote:

>> test/jdk/java/awt/print/PrinterJob/PrintTextTest.java line 232:
>> 
>>> 230:     }
>>> 231: 
>>> 232:     // The test needs a physical font that supports Latin.
>> 
>> The `getPhysicalFont` could be updated so that its `switch` statement uses `Font.` constants, I'm pretty sure that was the intention.
>
> It looks like it's trying to be extra resilient by switching on `n.toLowerCase()` (i.e. case-insensitive). Is it OK to make it case-sensitive and use the constants?

I thought about it too. Using constants and case-sensitive switch should be enough.

Also, I think the `switch` statement should have `continue` rather than `break` for these logical fonts… unless the logical fonts are guaranteed to be in the end of the array returned by `GraphicsEnvironment.getAvailableFontFamilyNames()`.

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

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


More information about the client-libs-dev mailing list