changeset 9713:7b6211cd8d76

6417649: -interval=0 is accepted and jconsole doesn't update window content at all Reviewed-by: alanb, jbachorik
author egahlin
date Wed, 21 Aug 2013 17:15:44 +0200
parents 7496ec8bab76
children 77a32e5df365
files src/share/classes/sun/tools/jconsole/JConsole.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/sun/tools/jconsole/JConsole.java	Thu Aug 22 15:54:50 2013 -0700
+++ b/src/share/classes/sun/tools/jconsole/JConsole.java	Wed Aug 21 17:15:44 2013 +0200
@@ -858,6 +858,10 @@
                 try {
                     updateInterval = Integer.parseInt(arg.substring(10)) *
                         1000;
+                    if (updateInterval <= 0) {
+                        usage();
+                        return;
+                    }
                 } catch (NumberFormatException ex) {
                     usage();
                     return;