ping... -----Original Message----- From: serviceability-dev [mailto:serviceability-dev-boun...@openjdk.java.net] On Behalf Of Yuri Gaevsky Sent: Thursday, November 20, 2014 1:11 AM To: serviceability-dev@openjdk.java.net Subject: RFR(XS) 6364329 jstat displays "invalid argument count" with usage
Hello. Please see below a small fix for integration into JDK 9: $ hg diff diff --git a/src/jdk.jcmd/share/classes/sun/tools/jstat/Arguments.java b/src/jdk.jcmd/share/classes/sun/tools/jstat/Arguments.java --- a/src/jdk.jcmd/share/classes/sun/tools/jstat/Arguments.java +++ b/src/jdk.jcmd/share/classes/sun/tools/jstat/Arguments.java @@ -141,8 +141,9 @@ public Arguments(String[] args) throws IllegalArgumentException { int argc = 0; - if (args.length < 1) { - throw new IllegalArgumentException("invalid argument count"); + if (args.length == 0) { + help = true; + return; } if ((args[0].compareTo("-?") == 0) Thanks, -Yuri