#748 AbstractDataset can have an inconsistent state

1.0.x
closed
General (896)
5
2007-08-01
2007-04-24
No

Just happened to be browsing AbstractDataset and noticed that though setGroup() doesn't allow null groups, the constructor doesn't set the group. getGroup() doesn't do any sort of checking for nulls either, so it would be possible to accidentally get this undefined case.

Now, in my actual test cases I get a group, so this smells like a forgotten edge case. I don't have time to write a full test case to see for sure, but I thought I'd report it anyway.

Discussion

  • David Gilbert

    David Gilbert - 2007-08-01

    Logged In: YES
    user_id=112975
    Originator: NO

    Hi Nick,

    I looked in the AbstractDataset sources and the group is initialised in the first line of the constructor. I'll close this bug, but please re-open if you think I've missed something...

    Regards,

    Dave Gilbert
    JFreeChart Project Leader

     
  • David Gilbert

    David Gilbert - 2007-08-01
    • labels: --> General
    • milestone: --> 1.0.x
    • assigned_to: nobody --> mungady
    • status: open --> closed
     
  • Nick Guenther

    Nick Guenther - 2007-08-01

    Logged In: YES
    user_id=705725
    Originator: YES

    ...that's funny, you're right.
    I last looked at this code over 4 months ago in another city. Perhaps the version I had did not have this fix? Or maybe I was looking at a different file.
    Oh well. Nevermind.

     

Log in to post a comment.