RFR: 8260592: jpackage tests fail when Desktop is not supported
Alexey Semenyuk
asemenyuk at openjdk.java.net
Thu Jan 28 23:44:43 UTC 2021
On Thu, 28 Jan 2021 22:05:17 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> test/jdk/tools/jpackage/apps/image/Hello.java line 166:
>>
>>> 164: }
>>> 165:
>>> 166: if (!Desktop.isDesktopSupported()) {
>>
>> Would it make more sense to replace
>> `if (GraphicsEnvironment.isHeadless())`
>> with
>> `if (GraphicsEnvironment.isHeadless() || !Desktop.isDesktopSupported())`
>> without need to add another `trace()` call?
>
> I would prefer to have separate messages for "headless" and "desktop capable". I can merge these, if you insist.
Duplicated messages are not much help in understanding control flow. I'd change the new message or merge conditions. Whatever you prefer.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2291
More information about the core-libs-dev
mailing list