JDK-8209036 : systemTests should use PlatformLogger instead of java.util.logging
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: other
  • Affected Version: jfx11
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2018-08-06
  • Updated: 2025-04-03
  • Resolved: 2025-04-03
Related Reports
Relates :  
Relates :  
Description
This is a follow-on issue to JDK-8195974.

The fix for JDK-8195974 eliminated the dependency on the java.logging module from the javafx.* modules by replacing all calls to java.util.logging with calls to com.sun.javafx.logging.PlatformLogger, which is in javafx.base.

A few of the systemTests -- in tests/system/src/test*/java -- still use j.u.l. These calls could be changed to use PlatformLogger with a fairly simple enhancement to that utility class. The system tests that still use j.u.l use a custom logging Handler.

Adding logging Handler functionality should be pretty straight-forward. The easiest way to do this might be to add a log(Level, String, Object...) method, which would be called by all of the convenience methods, and then have that method call the custom log handler, if one is set.
Comments
May not be suitable to fix the issue at the moment. As of earlier comments, it has classes dependency on Util.
03-04-2025

These tests heavily rely on - import java.util.logging.Handler; import java.util.logging.LogRecord; There is no replacement for `Handler` and `LogRecord` while using System.Logger. All of these tests (except one) use a `Handler` to intercept the log messages and assert based on certain conditions. I am not sure whether it is worth the effort to rewrite test logic by rewriting the utilities parallel to Handler and LogRecord classes from java.util.logging.
02-04-2025

Here is the list of files in the systemTests project that use java.util.logging: tests/system/src/test/java/test/com/sun/javafx/sg/prism/RT36296Test.java tests/system/src/test/java/test/com/sun/marlin/ClipShapeTest.java tests/system/src/test/java/test/com/sun/marlin/QPathTest.java tests/system/src/testapp3/java/mymod/module-info.java tests/system/src/testapp3/java/mymod/myapp3/AppTableViewExported.java tests/system/src/testapp3/java/mymod/myapp3/AppTableViewOpened.java tests/system/src/testapp3/java/mymod/myapp3/AppTableViewQualExported.java tests/system/src/testapp3/java/mymod/myapp3/AppTableViewQualOpened.java tests/system/src/testapp3/java/mymod/myapp3/AppTableViewUnexported.java tests/system/src/testapp3/java/mymod/myapp3/AppTreeTableViewExported.java tests/system/src/testapp3/java/mymod/myapp3/AppTreeTableViewOpened.java tests/system/src/testapp3/java/mymod/myapp3/AppTreeTableViewQualExported.java tests/system/src/testapp3/java/mymod/myapp3/AppTreeTableViewQualOpened.java tests/system/src/testapp3/java/mymod/myapp3/AppTreeTableViewUnexported.java tests/system/src/testapp4/java/mymod/module-info.java tests/system/src/testapp4/java/mymod/myapp4/AppBindingsQualExported.java tests/system/src/testapp4/java/mymod/myapp4/AppBindingsUnexported.java
06-08-2018