kvr000 commented on PR #1270: URL: https://github.com/apache/commons-lang/pull/1270#issuecomment-2345149560
> Hello @kvr000 > > * See my scattered comments. > * Add a method called `createSortedList(int...)` that guarantees sorted results and use it. > * Add tests for non-sorted input, make sure the results are predictable, we do not want a DOS for an infinite loop for example. The `createdSortedList()` won't have any value. In the test, I have to see what is returned index - that's impossible with unsorted array. Additionally, now it's used also for intentionally unsorted array. Good point for non-sorted input, I added a test. The code always does `l = m+1` or `h = m-1` , so it's safe. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
