On Mon, 15 Dec 2025 15:45:39 GMT, Dan Heidinga <[email protected]> wrote:
>> Stefan Karlsson has updated the pull request incrementally with two >> additional commits since the last revision: >> >> - Mark oop_arraycopy as nodiscard >> - Terminate OopCopyResult in oop_arraycopy_raw > > src/hotspot/share/oops/access.hpp line 335: > >> 333: } >> 334: >> 335: [[nodiscard]] > > Is it worth leaving a comment on why the `[[nodiscard]]` annotation was used > here? I started to write a comment but they end up being something like: // Make sure that the caller does not accidentally ignore the return value which is sort-of what [[nodiscard]] means, so I'm not sure this is a good comment. Maybe something talking about why it is important to not forget to check the return value: The caller is responsible to throw an exception on failure WDYT? ------------- PR Review Comment: https://git.openjdk.org/valhalla/pull/1792#discussion_r2620634111
