[
https://issues.apache.org/jira/browse/MAHOUT-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13057655#comment-13057655
]
Sean Owen commented on MAHOUT-750:
----------------------------------
This "patch" is not against HEAD, as it is already fixed in HEAD. That's the
good news but I'd advise you to work off HEAD if you're developing.
> 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
> 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