RFR: 8303740 JavaFX - Leak in Logging, Logging remembers last exception

Florian Kirmaier fkirmaier at openjdk.org
Wed Mar 8 09:56:15 UTC 2023


On Wed, 8 Mar 2023 08:19:25 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:

>> I think it's cleaner, to just have nothing in production.
>> The flag is a bit ugly - just aesthetically, but I don't think it's a problem.
>
>> I think it's cleaner, to just have nothing in production. The flag is a bit ugly - just aesthetically, but I don't think it's a problem.
> 
> IMHO, the `Logging` class should also not be there, as it is just a facade for `PlatformLogger` specifically there for these tests.
> 
> The tests took the easy way out here to test for log messages by modifying production code to use a different logger (and introducing a leak by doing so). An alternative would be to install a `LoggerFinder` only when tests run, and allow this to be inspected.

@hjohn 
You are right, this would be the correct solution.
I guess that would require more changes than my PR.
I don't plan to do it, I also don't know how to do it.
So, this PR would still provide a quick fix for the bug.

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

PR: https://git.openjdk.org/jfx/pull/1053


More information about the openjfx-dev mailing list