On Tue, 26 Mar 2024 07:44:22 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
> > I have a concern since the null check bailout involves > > THROW_NULL_PDATA_IF_NOT_DESTROYED, which is no longer accurate if we remove > > the pData local. > > The name of the macro is not great, but it does not involve pData (the bad > NPE error message notwithstanding): > > ``` > #define THROW_NULL_PDATA_IF_NOT_DESTROYED(peer) { \ > jboolean destroyed = JNI_GET_DESTROYED(peer); \ > if (destroyed != JNI_TRUE) { \ > env->ExceptionClear(); \ > JNU_ThrowNullPointerException(env, "null pData"); \ > } \ > } > ``` > > So you can go ahead and replace the pData references with the variable that > will eventually be used. Alright, will do. Maybe as a further improvement, I can inline THROW_NULL_PDATA_IF_NOT_DESTROYED at its callsites and replace the bad NullPointerException error message with the proper null pointer name. Since Phil isn't here, what do you think? Regardless, I really hope I can get this in by Thursday. University for me officially ramps up into _very_ high gear about that time, and I doubt I can juggle both JDK work and it all at once by then ------------- PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-2019839348