RFR: 8304717: Declaration aliasing between boolean and jboolean is wrong [v2]

Quan Anh Mai qamai at openjdk.org
Fri Mar 24 05:37:30 UTC 2023


On Thu, 23 Mar 2023 22:23:00 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> A couple of spots wrongly refer to boolean and jboolean as the same thing. While this does still compile thanks to a happy accident and implicit conversions, they are not the same at all, and should be fixed before a future compiler error happens if their declarations are touched
>
> Julian Waters has updated the pull request incrementally with one additional commit since the last revision:
> 
>   MacOSXPreferencesFile.m

Is this needed? A boolean-to-int conversion returns `1` if the input is `true` and `0` otherwise. The opposite returns `true` for non-zero value and `false` otherwise. Unless we have some tricky `jboolean` value that should not happen they should behave the same?

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

PR Comment: https://git.openjdk.org/jdk/pull/13139#issuecomment-1482276217



More information about the client-libs-dev mailing list