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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Major - P3
    • 3.1.0
    • Affects Version/s: 3.0.0
    • Component/s: BSON
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Jeffrey Yemin
            Reporter:
            Michael Brown
            None
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: