On Mon, 11 Mar 2024 18:16:53 GMT, Erik Joelsson <er...@openjdk.org> wrote:

> If you really want to require an exact match for jspawnhelper, then these 4 
> numbers aren't necessarily enough, but a rather arbitrarily chosen 
> approximation.

I think for our purposes, a version number quadruplet is enough to provide 
basic level of safety for jspawnhelper protocol updates across JDK versions, 
without version checking code being a safety problem itself. 

Putting in the full version string would raise more questions, at least for me. 
For example, are we guaranteed that version string always fits the argument 
line? Probably so. Would we get some interesting (Unicode?) symbols in version 
string that would break somewhere along the way? Would we need to dynamically 
allocate the buffer for arguments, instead of allocating enough to hold the 
version _integers_? Would we make a mistake while doing so? Etc.

All in all, it feels better to silently accept some version mismatches not 
captured by the version quadruplet, rather than fail trying to do a perfect 
match.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/18204#issuecomment-1989179598

Reply via email to