RFR: JDK-8326140: src/jdk.accessibility/windows/native/libjavaaccessbridge/AccessBridgeJavaEntryPoints.cpp ReleaseStringChars might be missing in early returns

Matthias Baesken mbaesken at openjdk.org
Thu Feb 22 08:27:54 UTC 2024


On Mon, 19 Feb 2024 13:04:47 GMT, Matthias Baesken <mbaesken at openjdk.org> wrote:

> In AccessBridgeJavaEntryPoints.cpp we have a couple of exception checks with potential early returns. Those miss ReleaseStringChars .

> In other words, this CHECK should be placed next to where I can see the call that requires it.

Hi Phil, I thought about this too. Just one EXCEPTION_CHECK_WITH_RELEASE macro and there the second check inside this macro, the two   EXCEPTION_CHECK_WITH_RELEASE and EXCEPTION_CHECK just after it look a bit odd.
Should I change it this way and use just one macro ?  Btw. at some places the  ` EXCEPTION_CHECK_WITH_RELEASE` is placed not directly placed after the` jniEnv->GetStringLength`  call ; should I move it up there or keep it where it was ?

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

PR Comment: https://git.openjdk.org/jdk/pull/17915#issuecomment-1958934721


More information about the client-libs-dev mailing list