RFR: 8330532: Improve line-oriented text parsing in HotSpot [v3]
Johan Sjölen
jsjolen at openjdk.org
Tue Apr 23 07:43:33 UTC 2024
On Mon, 22 Apr 2024 22:02:29 GMT, John R Rose <jrose at openjdk.org> wrote:
>> src/hotspot/share/utilities/istream.hpp line 150:
>>
>>> 148: assert(_buffer_size == 0 || _next <= _buffer_size, "");
>>> 149: return true;
>>> 150: }
>>
>> Please add message, even if only "invariant".
>
> No, that’s not necessary. There are many, many empty assert strings in HotSpot. If there’s no message, it means “check the code logic here”. You don’t need to say “invariant” or “sanity” or “must be” as a redundant means of conveying that message. Although, some authors do this. But if there are a long string of asserts, saying “invariant” that many times is simply noise.
I was not aware of that, thanks! Let's skip this change then.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18833#discussion_r1575793996
More information about the hotspot-dev
mailing list