Menu

#804 Failing addValue/setValue in 1.0.7

1.0.x
closed-fixed
General (896)
5
2007-11-21
2007-11-21
Anonymous
No

Create a DefaultCategoryDataset, add some values.

Than, remove the LAST column of that set with removeColumn().

Now, try to add a value with that (just deleted) column key.

Expected behavior: the dataset should (re-)create the column.

Instead, when calling addValue or setValue, the call fails with an IndexOutOfBoundsException:

Exception in thread "AWT-EventQueue-0" java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.set(Unknown Source)
at org.jfree.data.DefaultKeyedValues.setValue(DefaultKeyedValues.java:233)
at org.jfree.data.DefaultKeyedValues2D.setValue(DefaultKeyedValues2D.java:335)
at org.jfree.data.DefaultKeyedValues2D.addValue(DefaultKeyedValues2D.java:301)
at org.jfree.data.category.DefaultCategoryDataset.addValue(DefaultCategoryDataset.java:218)

Thanks,

Reiner Pittinger
rp@digital-wave.de

Discussion

  • David Gilbert

    David Gilbert - 2007-11-21

    Logged In: YES
    user_id=112975
    Originator: NO

    Thanks for the report. I just committed a fix to Subversion, for inclusion in the 1.0.8 release.

     
  • David Gilbert

    David Gilbert - 2007-11-21
    • assigned_to: nobody --> mungady
    • status: open --> closed-fixed
     

Log in to post a comment.