On Fri, 1 Aug 2025 22:46:47 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
>> modules/javafx.graphics/src/main/java/com/sun/prism/mtl/MTLContext.java line >> 98: >> >>> 96: try { >>> 97: final String shaderLibName = "msl/jfxshaders.metallib"; >>> 98: final Class<?> clazz = >>> Class.forName("com.sun.prism.mtl.MTLContext"); >> >> What is the purpose of this change? It's almost always better to reference a >> known class directly rather than `Class.forName(...)`, especially in this >> case where we're referring to ourself. I recommend reverting this change and >> assigning it to `MTLContext.class` directly. > > In case it wasn't clear from the context, I recommend changing just this one > line to: > > > final Class<?> clazz = MTLContext.class; Reverted the change, `forName` was a wrong choice. ------------- PR Review Comment: https://git.openjdk.org/jfx/pull/1824#discussion_r2251272281