RFR: 8365606: Container code should not be using jlong/julong [v2]
Severin Gehwolf
sgehwolf at openjdk.org
Tue Nov 4 07:09:47 UTC 2025
On Mon, 27 Oct 2025 09:17:02 GMT, Andrew Haley <aph at openjdk.org> wrote:
> > it wasn't because we wanted to figure out the color of the bike shed but rather how to write safer code that makes it less likely to accidentally introduce bugs because of type conflation.
>
> This. A function that returns its value as a side effect on a reference parameter is (at best) a code smell.
Thanks for the comments. So what's the consensus then? As far as API surface is concerned I've modelled it after [JDK-8357086](https://bugs.openjdk.org/browse/JDK-8357086). It [introduces](https://github.com/openjdk/jdk/commit/d5d94db12a6d82a6fe9da18b5f8ce3733a6ee7e7) the side-effect/code smell issue. Do we want to re-open this discussion or proceed with this here. It's not clear to me.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27743#issuecomment-3469549344
More information about the hotspot-dev
mailing list