RFR: 8211163: UNIX version of Java_java_io_Console_echo does not return a clean boolean

Andrew Haley aph at redhat.com
Sat Sep 29 09:32:35 UTC 2018

On 09/28/2018 04:08 PM, Volker Simonis wrote:
> Yes, but the next developer who adds a function which returns jboolean
> and looks at your implementation could easily introduce new,  buggy
> code like the one you fixed (because from a C-perspective that makes
> no difference). But if he sees that other JNI functions all return
> exclusively JNI_TRUE/JNI_FALSE he may be  inclined to do so as well.

I'm not convinced that it'll make such mistakes much less likely, and
I do not believe that making code so ugly and verbose is sensible.

Also, I do no believe that we should introduce dead code. And this
absolutely is dead code.

Andrew Haley
Java Platform Lead Engineer
Red Hat UK Ltd. <https://www.redhat.com>
EAC8 43EB D3EF DB98 CC77 2FAD A5CD 6035 332F A671

More information about the core-libs-dev mailing list