RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v52]
Julian Waters
jwaters at openjdk.org
Tue Mar 26 08:50:07 UTC 2024
On Tue, 26 Mar 2024 07:44:22 GMT, Magnus Ihse Bursie <ihse at 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
More information about the build-dev
mailing list