On Fri, 24 Mar 2023 03:02:47 GMT, David Holmes <dhol...@openjdk.org> wrote:
>> Julian Waters has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Explicit conversion to jboolean > > src/java.prefs/macosx/native/libprefs/MacOSXPreferencesFile.m line 685: > >> 683: CFStringRef topKey; >> 684: CFMutableDictionaryRef topValue; >> 685: Boolean beforeAdd = false; > > The return value from `CFDictionaryContainsKey` is a Boolean and is assigned > to this variable. So I think these changes are the wrong way round. Keep this > as a Boolean but convert the return value to jboolean: > > return beforeAdd ? JNI_TRUE : JNI_FALSE; Argh, looks like Apple and Objective-C still use the ancient Boolean types from Carbon for the CoreFoundation APIs. Sigh... ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/13139#discussion_r1154042130