IndexOutOfBoundsException within sort method of OnlineSummarizer
----------------------------------------------------------------
Key: MAHOUT-750
URL: https://issues.apache.org/jira/browse/MAHOUT-750
Project: Mahout
Issue Type: Bug
Components: Math
Affects Versions: 0.5, 0.4, 0.6
Reporter: XiaoboGu
Priority: Blocker
Fix For: 0.6
When the total number of samples added to OnlineSummarizer is less than 100 ,
then sort() will thrown this :
private void sort() {
if (!sorted && starter != null) {
starter.sortFromTo(0, 99);
sorted = true;
}
}
And I think it should be
private void sort() {
if (!sorted && starter != null) {
starter.sortFromTo(0, Math.min(starter.size() - 1, 99));
sorted = true;
}
}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira