From: SourceForge.net <no...@so...> - 2007-03-29 13:50:07
|
Bugs item #1690654, was opened at 2007-03-29 06:50 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1690654&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Bug in removeValue method of DefaultKeyedValues2D Initial Comment: Bug occurs in removeValue method of DefaultKeyedValues2D. Error happens in the case where all the rows that contains a particular columnKey have been removed. In this case the column should also be remove. However, because of the way the test is done to see if all the column values are null (see code fragment) the fact that a particular series (column) is not there is not recognized. The error is due to the fact that the columnIndex as opposed to the columnKey is use to check if the values are null. One possible fix is to check if columns should be removed before removing the rows and then doing both together. This bug causes the the getSeriesCount() method in TimeTableXYDataset to give incorrect after data that is removed causes the number of series in the dataset to decrease. allNull = true; int columnIndex = getColumnIndex(columnKey); for (int item = 0, itemCount = this.rows.size(); item < itemCount; item++) { row = (DefaultKeyedValues) this.rows.get(item); if (row.getValue(columnIndex) != null) { allNull = false; break; } } Mark Smith mas...@al... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1690654&group_id=15494 |