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

Matthias Baesken mbaesken at openjdk.org
Mon Feb 19 13:12:02 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 .

btw there might be further room for improvement / simplification. The current macro code blocks look like this


            EXCEPTION_CHECK_WITH_RELEASE("message1", FALSE, js, stringBytes);
            EXCEPTION_CHECK("message2 for ReleaseStringChars()", FALSE);


The second parameter could be omitted because it is always FALSE anyway in those EXCEPTION_CHECK_WITH_RELEASE blocks.
The second line EXCEPTION_CHECK could be moved into the macro EXCEPTION_CHECK_WITH_RELEASE  itself .

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

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


More information about the client-libs-dev mailing list