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

Improve documentation for deprecated GridFsFile methods

    • Type: Icon: Improvement Improvement
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.4.2
    • Component/s: GridFS
    • None

      GridFsFile.getContentType() is deprecated with a hint to use the metadata document instead. however there's no documentation which field is to be accessed to obtain the content type. Also, it looks like the method is deprecated but doesn't return the content type anymore.

      What's the reason for the deprecation in the first place. What's wrong with looking up the value from the new location falling back on the old one if none could be found. With the deprecation clients now all of a sudden have to have intimate knowledge about the structure of the metadata document instead of just being able to access the content type, no matter where it's coming from. That's a huge step backwards, isn't it?

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            oliver.gierke Oliver Gierke
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: