From: SourceForge.net <no...@so...> - 2008-05-01 15:10:40
|
Bugs item #1955483, was opened at 2008-05-01 08:10 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=1955483&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: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |
From: SourceForge.net <no...@so...> - 2008-05-12 15:41:51
|
Bugs item #1955483, was opened at 2008-05-01 15:10 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&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: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) >Assigned to: David Gilbert (mungady) Summary: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- >Comment By: David Gilbert (mungady) Date: 2008-05-12 15:41 Message: Logged In: YES user_id=112975 Originator: NO A fix has been committed to Subversion for inclusion in the upcoming 1.0.10 release. Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |
From: SourceForge.net <no...@so...> - 2008-11-21 14:20:48
|
Bugs item #1955483, was opened at 2008-05-01 18:10 Message generated for change (Comment added) made by teodord You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&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: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: David Gilbert (mungady) Summary: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- Comment By: Teodor Danciu (teodord) Date: 2008-11-21 16:20 Message: Hi, I think there is still something wrong with this. If you have autosort true and allowduplicates true as well, it can happen that the value already exists and it is the first in the list, in which case the index returned would be zero. And we end up trying to add a new value at index -1, which makes it blow up with: java.lang.IndexOutOfBoundsException: Index: -1, Size: 13 at java.util.ArrayList.add(ArrayList.java:367) at org.jfree.data.xy.XYSeries.addOrUpdate(XYSeries.java:571) Thanks, Teodor ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-05-12 18:41 Message: Logged In: YES user_id=112975 Originator: NO A fix has been committed to Subversion for inclusion in the upcoming 1.0.10 release. Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |
From: SourceForge.net <no...@so...> - 2008-11-24 08:41:03
|
Bugs item #1955483, was opened at 2008-05-01 15:10 Message generated for change (Settings changed) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&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: Accepted >Priority: 9 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: David Gilbert (mungady) Summary: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- Comment By: Teodor Danciu (teodord) Date: 2008-11-21 14:20 Message: Hi, I think there is still something wrong with this. If you have autosort true and allowduplicates true as well, it can happen that the value already exists and it is the first in the list, in which case the index returned would be zero. And we end up trying to add a new value at index -1, which makes it blow up with: java.lang.IndexOutOfBoundsException: Index: -1, Size: 13 at java.util.ArrayList.add(ArrayList.java:367) at org.jfree.data.xy.XYSeries.addOrUpdate(XYSeries.java:571) Thanks, Teodor ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-05-12 15:41 Message: Logged In: YES user_id=112975 Originator: NO A fix has been committed to Subversion for inclusion in the upcoming 1.0.10 release. Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |
From: SourceForge.net <no...@so...> - 2008-11-24 08:42:04
|
Bugs item #1955483, was opened at 2008-05-01 15:10 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&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: Accepted Priority: 9 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: David Gilbert (mungady) Summary: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-11-24 08:41 Message: Hi Teodor, You are right. Thanks for spotting/reporting this, I'll fix it now. Best regards, Dave ---------------------------------------------------------------------- Comment By: Teodor Danciu (teodord) Date: 2008-11-21 14:20 Message: Hi, I think there is still something wrong with this. If you have autosort true and allowduplicates true as well, it can happen that the value already exists and it is the first in the list, in which case the index returned would be zero. And we end up trying to add a new value at index -1, which makes it blow up with: java.lang.IndexOutOfBoundsException: Index: -1, Size: 13 at java.util.ArrayList.add(ArrayList.java:367) at org.jfree.data.xy.XYSeries.addOrUpdate(XYSeries.java:571) Thanks, Teodor ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-05-12 15:41 Message: Logged In: YES user_id=112975 Originator: NO A fix has been committed to Subversion for inclusion in the upcoming 1.0.10 release. Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |
From: SourceForge.net <no...@so...> - 2008-11-24 09:49:40
|
Bugs item #1955483, was opened at 2008-05-01 15:10 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&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: Accepted Priority: 9 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: David Gilbert (mungady) Summary: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-11-24 09:49 Message: Fix committed to Subversion for inclusion in the 1.0.12 release. ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-11-24 08:41 Message: Hi Teodor, You are right. Thanks for spotting/reporting this, I'll fix it now. Best regards, Dave ---------------------------------------------------------------------- Comment By: Teodor Danciu (teodord) Date: 2008-11-21 14:20 Message: Hi, I think there is still something wrong with this. If you have autosort true and allowduplicates true as well, it can happen that the value already exists and it is the first in the list, in which case the index returned would be zero. And we end up trying to add a new value at index -1, which makes it blow up with: java.lang.IndexOutOfBoundsException: Index: -1, Size: 13 at java.util.ArrayList.add(ArrayList.java:367) at org.jfree.data.xy.XYSeries.addOrUpdate(XYSeries.java:571) Thanks, Teodor ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-05-12 15:41 Message: Logged In: YES user_id=112975 Originator: NO A fix has been committed to Subversion for inclusion in the upcoming 1.0.10 release. Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |
From: SourceForge.net <no...@so...> - 2008-11-24 09:49:46
|
Bugs item #1955483, was opened at 2008-05-01 15:10 Message generated for change (Settings changed) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&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: Closed >Resolution: Fixed Priority: 9 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: David Gilbert (mungady) Summary: XYSeries.addOrUpdate() should add if duplicates are allowed Initial Comment: Copied from this post (by Ted Schwartz) in the forum: http://www.jfree.org/phpBB2/viewtopic.php?t=24523 I've found a bug in jfreechart-1.0.9 code for org.jfree.data.xy.XYSeries. There was a change some time ago which introduced the notion of allowing duplicate X values in XYSeries data. The method addOrUpdate(Number x, Number y) was never modified to support this, and therefore duplicate data were overwriting existing data. This is the fix I've made, but I don't know how to submit a patch... $ diff original/jfreechart-1.0.9/source/org/jfree/data/xy/XYSeries.java fixed/org/jfree/data/xy/XYSeries.java 537c537 < if (index >= 0) { --- > if (index >= 0 && !allowDuplicateXValues) { 545a546,559 > } else if (index >= 0){ > XYDataItem item = new XYDataItem(x, y); > // need to make sure we are adding *after* any duplicates > int size = this.data.size(); > while (index < size > && item.compareTo(this.data.get(index)) == 0) { > index++; > } > if (index < this.data.size()) { > this.data.add(index, item); > } > else { > this.data.add(item); > } 558,561d571 < // check if this addition will exceed the maximum item count... < if (getItemCount() > this.maximumItemCount) { < this.data.remove(0); < } 562a573,576 > // check if this addition will exceed the maximum item count... > if (getItemCount() > this.maximumItemCount) { > this.data.remove(0); > } ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-11-24 09:49 Message: Fix committed to Subversion for inclusion in the 1.0.12 release. ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-11-24 08:41 Message: Hi Teodor, You are right. Thanks for spotting/reporting this, I'll fix it now. Best regards, Dave ---------------------------------------------------------------------- Comment By: Teodor Danciu (teodord) Date: 2008-11-21 14:20 Message: Hi, I think there is still something wrong with this. If you have autosort true and allowduplicates true as well, it can happen that the value already exists and it is the first in the list, in which case the index returned would be zero. And we end up trying to add a new value at index -1, which makes it blow up with: java.lang.IndexOutOfBoundsException: Index: -1, Size: 13 at java.util.ArrayList.add(ArrayList.java:367) at org.jfree.data.xy.XYSeries.addOrUpdate(XYSeries.java:571) Thanks, Teodor ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2008-05-12 15:41 Message: Logged In: YES user_id=112975 Originator: NO A fix has been committed to Subversion for inclusion in the upcoming 1.0.10 release. Regards, Dave Gilbert JFreeChart Project Leader ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=1955483&group_id=15494 |