Menu

#664 IllegalArgumentException in ChartMouseEvent

1.0.x
closed-fixed
General (896)
5
2006-09-13
2006-09-12
No

In ChartPanel.mouseMoved there's a line of code which
create a new ChartMouseEvent using as first parameter
the object returned by getChart(). For getChart() is
legal to returns null if the chart is null, but
ChartMouseEvent's constructor calls the parent
constructor which throws an IllegalArgumentException if
the object passed in is null.
Here's the stack trace:

java.lang.IllegalArgumentException: null source
at java.util.EventObject.<init>(EventObject.java:38)
at
org.jfree.chart.ChartMouseEvent.<init>(ChartMouseEvent.java:83)
at
org.jfree.chart.ChartPanel.mouseMoved(ChartPanel.java:1692)
at
java.awt.AWTEventMulticaster.mouseMoved(AWTEventMulticaster.java:271)
at
java.awt.Component.processMouseMotionEvent(Component.java:5533)
at
javax.swing.JComponent.processMouseMotionEvent(JComponent.java:3144)
at java.awt.Component.processEvent(Component.java:5257)
at java.awt.Container.processEvent(Container.java:1966)
at
java.awt.Component.dispatchEventImpl(Component.java:3955)
at
java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Component.dispatchEvent(Component.java:3803)
at
java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
at
java.awt.LightweightDispatcher.processMouseEvent(Container.java:3905)
at
java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
at
java.awt.Container.dispatchEventImpl(Container.java:2010)
at java.awt.Window.dispatchEventImpl(Window.java:1774)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
<deleted entry>
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at
java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Discussion

  • David Gilbert

    David Gilbert - 2006-09-13

    Logged In: YES
    user_id=112975

    Thanks for the report. I've committed a fix to CVS ready
    for the next release (1.0.3).

     
  • David Gilbert

    David Gilbert - 2006-09-13
    • milestone: --> 1.0.x
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed
     

Log in to post a comment.