RFR(XS) 6364329 jstat displays "invalid argument count" with usage
Yuri Gaevsky
ygaevsky at azulsystems.com
Wed Nov 19 22:11:19 UTC 2014
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
More information about the serviceability-dev
mailing list