[JAVA-3280] gridfs can not upload empty file Created: 30/Apr/19 Updated: 27/Oct/23 Resolved: 26/Aug/19 |
|
| Status: | Closed |
| Project: | Java Driver |
| Component/s: | GridFS |
| Affects Version/s: | 3.10.1 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Li Tc | Assignee: | John Stewart (Inactive) |
| Resolution: | Gone away | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Description |
|
if the file size is 0,the GridFSUploadStreamImpl line 96 while pass and keep the var “len” is 0 and GridFSBucketImpl line 201 need "len" val is -1 to stop the loop, so the loop will never end. i think need throw exception or just upload a empty file |
| Comments |
| Comment by John Stewart (Inactive) [ 02/Aug/19 ] | |||||
|
I tried to reproduce this issue with the following code:
This code succeeds. Could you provide code that reproduces the issue? Thanks. |