[JAVA-20] List returned by cursor.toArray() can not be modified Created: 12/Aug/09 Updated: 02/Oct/09 Resolved: 17/Aug/09 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 0.8 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Ryan Nitz | Assignee: | Eliot Horowitz (Inactive) |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
The list object returned by calling the toArray() function is not modifiable. E.g. Collections.sort(values, myCustomSorter); Causes an unsupported operation exception: Caused by: java.lang.UnsupportedOperationException The source for DBCursor shows: Collections.unmodifiableList( _all ); Why is this list unmodifiable? I want to sot my data in the application layer instead of taxing Mongo with this. |