RFR: 8307160: Fix AWT/2D/A11Y to support the permissive- flag on the Microsoft Visual C compiler [v52]

Magnus Ihse Bursie ihse at openjdk.org
Tue Mar 26 07:47:47 UTC 2024


On Tue, 26 Mar 2024 00:13:09 GMT, Julian Waters <jwaters 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.

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

PR Comment: https://git.openjdk.org/jdk/pull/15096#issuecomment-2019589225


More information about the build-dev mailing list