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

NOP used where cast expected in Document.get(String,Class)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major - P3 Major - P3
    • 3.1.0
    • 3.0.0
    • BSON
    • None

    Description

      public <T> T get(final Object key, final Class<T> clazz)

      This implementation does a 'fake' cast of (T) which discards the 'clazz' parameter altogether. value = (T) someObject is a NOP in Java, and that is why somebody has put a warnings suppression on this method.

      It's an easy fix, and I am happy to do it myself, but I don't know your project bylaws etc on user contribution and review processes. Please advise.

      Attachments

        Activity

          People

            jeff.yemin@mongodb.com Jeffrey Yemin
            supersoftcafe Michael Brown
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: