<AWT Dev> RFR: 8242559: Clean the "libawt_xawt" library from code for headless mode

Magnus Ihse Bursie ihse at openjdk.java.net
Wed Sep 30 10:37:00 UTC 2020


On Sun, 13 Sep 2020 09:16:33 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

>> Clearly these are there to prevent mistakes. So they add value at a tiny build time cost.
>> I don't see the point of removing them.
>
>> Clearly these are there to prevent mistakes. So they add value at a tiny build time cost.
>> I don't see the point of removing them.
> 
> That's the point of the fix, instead of implementing two versions of each method in these files just prevent
> compilation of the file in the headless mode. As far as understand both solutions are equivalent, but an assertion at
> the start of the file a much cleaner.

I agree with Sergey. This is much cleaner. All steps towards cleaning up the spaghetti code regarding headless/not
headless are important, even if they are small. It's like solving the thousand paper cuts issue; you have to address
every individual cut, not matter how miniscule.

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

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


More information about the awt-dev mailing list