On Wed, 10 Sep 2025 22:47:27 GMT, Ioi Lam <[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. ------------- PR Comment: https://git.openjdk.org/jdk/pull/27158#issuecomment-3278518160
