On Thu, 11 Sep 2025 06:44:51 GMT, Stefan Karlsson <[email protected]> wrote:

> > I didn't realize that my attempt to remove the JNIHandles::resolve() 
> > boilerplate can be conversional.
> 
> Removing boilerplate wasn't controversial. Spreading the j* types can be seen 
> as controversial give that we have various efforts to push those types out to 
> the boundaries of the JVM. Adding new convenience functions that accept j* 
> goes in the opposite direction.
> 
> > I can't put a helper function in jni.cpp because this pattern is used in 
> > several files.
> 
> But almost all are in jni.cpp and jvm.cpp and you can get rid of most of the 
> boilerplate code by adding local helpers there. The handfulish of other 
> places could keep their explicit usage of JNIHandles::resolve* calls.

Maybe in a different PR. I want to keep the current PR simple.

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

PR Comment: https://git.openjdk.org/jdk/pull/27158#issuecomment-3282181436

Reply via email to