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

NullPointerException when calling GridFSInputFile.save

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: