[DRIVERS-282] Nullpointer when calling "save" GridFSInputFile Created: 21/Jan/16  Updated: 15/Apr/19  Resolved: 21/Jan/16

Status: Closed
Project: Drivers
Component/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Francisco Manuel Benitez Chico Assignee: Barrie Segal
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Production - MongoJavaDriver 2.14.1



 Description   

Hello,

If I get an instance of GridFSInputFile from the method createFile() of GridFSInputFile, MongoDB Java Driver assigns null to the attribute _in.

So, when I want to call the "save" method from GridFSInputFile, I always get a NullPointerException (line 295 - GridFSInputFile) because this value is null, and I cannot set it anywhere (the only place is the constructor and with by the method createFile() is always null)

Does it make sense to have an method createFile without parameters if I always get a NullPointer when I try to save?

Many thanks.

Regards,
Paco.



 Comments   
Comment by Christian Amor Kvalheim [ 21/Jan/16 ]

wrongly filed

Comment by Francisco Manuel Benitez Chico [ 21/Jan/16 ]

Sorry...wrong project, please close it

I opened in the correct project: https://jira.mongodb.org/browse/JAVA-2096

Thanks!

Generated at Thu Feb 08 08:21:10 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.