On Fri, 1 Aug 2025 21:44:43 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> Ambarish Rapte has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   kcr: review: crash regression fix
>
> 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;

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1824#discussion_r2248971249

Reply via email to