6417649: -interval=0 is accepted and jconsole doesn't update window content at all

Reviewed-by: alanb, jbachorik
This commit is contained in:
Erik Gahlin 2013-08-21 17:15:44 +02:00
parent edd19c0f39
commit 422a4d5bc7

View File

@ -858,6 +858,10 @@ public class JConsole extends JFrame
try {
updateInterval = Integer.parseInt(arg.substring(10)) *
1000;
if (updateInterval <= 0) {
usage();
return;
}
} catch (NumberFormatException ex) {
usage();
return;