On Thu, 4 Feb 2021 07:11:19 GMT, Lin Zang <[email protected]> wrote:
> 8261131: jcmd jmap dump should not accept gz option with no value
Copyrights needs updating in both files.
src/jdk.jcmd/share/classes/sun/tools/jmap/JMap.java line 230:
> 228: } else if (subopt.startsWith("gz=")) {
> 229: compress_level = subopt.substring("gz=".length());
> 230: if (compress_level == null || compress_level.length() ==
> 0) {
I don't think `substring` can return `null`, so the proper fix was to remove
the null check and replace with your check for `== 0`.
-------------
PR: https://git.openjdk.java.net/jdk/pull/2399