8251374: jmap -dump could accept invalid options
Emit usage(1) in dump() argument loop Reviewed-by: sspitsyn, phh
This commit is contained in:
parent
0db838628c
commit
7638580477
@ -216,6 +216,11 @@ public class JMap {
|
||||
liveopt = "-live";
|
||||
} else if (subopt.startsWith("file=")) {
|
||||
filename = parseFileName(subopt);
|
||||
} else if (subopt.equals("format=b")) {
|
||||
// ignore format (not needed at this time)
|
||||
} else {
|
||||
System.err.println("Fail: invalid option: '" + subopt + "'");
|
||||
usage(1);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user