RFR: 8334137: Marlin: replace sun.misc.Unsafe memory access methods with FFM [v9]

Kevin Rushforth kcr at openjdk.org
Sat Nov 1 15:41:25 UTC 2025


On Sat, 1 Nov 2025 05:28:06 GMT, samypr100 <duke at openjdk.org> wrote:

> More of a follow-up question rather than a bug report yet (apologies if this is not the right avenue).

I'll give a brief answer here. Any follow-up discussion can happen on the mailing list.

> I found usage of [sun.misc.BASE64Encoder](https://github.com/openjdk/jfx/blob/c77c2335856a967907aaacc9546f44943c069add/modules/javafx.web/src/android/java/javafx/scene/web/WebEngine.java#L478) in `javafx.web` module

The `src/android` directory under the `javafx.web` module is unused by the JavaFX desktop build, and requires additional stuff outside the jfx repo to build it (I've never built it myself). Since `sun.misc.BASE64Encoder` no longer exists in the JDK -- and hasn't since it was removed in JDK 9 -- that copy of `WebEngine.java` cannot possibly compile unmodified, at least not with an unmodified JDK.

> as well as [jdk.unsupported](https://github.com/openjdk/jfx/blob/c77c2335856a967907aaacc9546f44943c069add/modules/javafx.graphics/src/main/java/module-info.java#L45) still referenced in javafx.graphics.
> 
> Would those need to be addressed as well (assuming the end goal was to remove all sun.misc references)? I'm also naively assuming the requires on `jdk.unsupported` can be dropped after these changes unless I'm mistaken.

Thank you for pointing this out. This was an oversight on my part. I should have removed the `requires jdk.unsupported` as part of this PR. I filed [JDK-8371087](https://bugs.openjdk.org/browse/JDK-8371087) as a follow-on to do this.

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

PR Comment: https://git.openjdk.org/jfx/pull/1814#issuecomment-3476468473


More information about the openjfx-dev mailing list