Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6470658

JConsole accepts negative numbers and zero in the -interval option

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6
    • tools
    • generic
    • generic

      JConsole accepts negative numbers and zero:

      % jconsole -interval=-123

      It would be better to check if interval > 0.
      When started with interval <=0, JConsole doesn't display graps at all and prints an exception:

      Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException: Non-positive period.
              at java.util.Timer.schedule(Timer.java:221)
              at sun.tools.jconsole.VMPanel.startUpdateTimer(VMPanel.java:442)
              at sun.tools.jconsole.VMPanel.propertyChange(VMPanel.java:321)
              at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
              at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:75)
              at javax.swing.event.SwingPropertyChangeSupport$1.run(SwingPropertyChangeSupport.java:80)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:597)
              at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
              at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
      Sorry, this is a duplicate. Closing.

            Unassigned Unassigned
            kshiroko Kirill Shirokov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: