Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2096

NullPointerException when calling GridFSInputFile.save

    • Type: Icon: Bug Bug
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: 2.14.1
    • Component/s: GridFS
    • None
    • Environment:
      Production

      Hello,

      If I get an instance of GridFSInputFile from the method createFile() of GridFS, 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            pacobenitezchico Francisco Manuel Benitez Chico
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: