RFR: 8304717: Declaration aliasing between boolean and jboolean is wrong [v2]
Julian Waters
jwaters at openjdk.org
Fri Mar 24 14:50:33 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
I'd argue it's more for correctness: Indeed it will still compile fine as of now, but the type of jboolean is not the only thing that can change; the other typedef'd boolean type can also be modified later on. Additionally, with compilers getting stricter as newer releases drop, it's a good idea to make sure the signatures match as best as possible, especially between declarations and definitions of the same method
-------------
PR Comment: https://git.openjdk.org/jdk/pull/13139#issuecomment-1482925961
More information about the core-libs-dev
mailing list