[JAVA-2030] GridFS causes java.lang.ClassCastException Created: 07/Nov/15 Updated: 01/Apr/16 Resolved: 09/Nov/15 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | 3.1.0 |
| Fix Version/s: | 3.1.1, 3.2.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Simon | Assignee: | Ross Lawley |
| Resolution: | Done | Votes: | 0 |
| Labels: | regression | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: | |||
| Description |
|
The line https://github.com/mongodb/mongo-java-driver/blob/169aa0c5db4387874b62005672ebdf529e9905c9/driver/src/main/com/mongodb/client/gridfs/GridFSFindIterableImpl.java#L125 causes the exception java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long on Android |
| Comments |
| Comment by Jeffrey Yemin [ 12/Nov/15 ] |
|
Closing for 3.1.1 release. |
| Comment by Ross Lawley [ 10/Nov/15 ] |
|
Hi leisim, We now allow any number type and then get the int or the long value. See: b67650f for the full fix. Ross |
| Comment by Simon [ 09/Nov/15 ] |
|
Hiw did you fix the problem? |
| Comment by Simon [ 07/Nov/15 ] |
|
It was uploaded with a software called "Mongo Management Studio"... |
| Comment by Ross Lawley [ 07/Nov/15 ] |
|
Hi leisim Thanks for the ticket - how was the file loaded into GridFS in the first place? Was it through another API or an older version of the driver? Ross |