On Wed, 24 Feb 2021 00:02:33 GMT, Lin Zang <lz...@openjdk.org> wrote:

> So in general, I think any solution we come up with will fail with older 
> JDKs, and need to fallback to retrying with a command we know will work.

Dear Chris, 
I just realized that my understand is a little different with the "retrying" -  
if we already know what is newly added argument, we can assume old jvm can not 
accept it. So it seems print error message is enough.   This is consistent with 
JDK16. 
But for older jvm, since there is no error message for unrecogized arguments, 
we need to fall back as you mentioned.
So maybe we can also revert the argument parsing logic introduced in JDK16? But 
it is wierd to me that jmap dump command siliently accept all strings as 
arguments without any error message.

BRs,
Lin

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

PR: https://git.openjdk.java.net/jdk/pull/2261

Reply via email to