Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-1868

Make JsonValueModule compatible with Jackson < 2.8

    XMLWordPrintable

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.2.1
    • None
    • None
    • 1
    • SDK34: CB++, OBO, Connect Prep

    Description

      If an old version of jackson-databind is on the class path (say, 2.5.3) then calls to contentAsObject fail with NoSuchMethodError because JsonValueModule uses JsonParser.currentToken which was added in Jackson 2.8.

      Can we rewrite JsonValueModule to be compatible with old Jackson? If not, we need to include it in the pre-flight check for using the non-shadowed Jackson, or perhaps always wrap the JacksonJsonSerializer with JsonValueSerializerWrapper so JsonObject/JsonArray are always (de)serialized using our repackaged Jackson.

      Suggested release note text:

      contentAsObject() and contentAsArray() no longer fail when a version of Jackson prior to 2.8.0 is on the class path.

       

      Attachments

        For Gerrit Dashboard: JCBC-1868
        # Subject Branch Project Status CR V

        Activity

          No work has yet been logged on this issue.

          People

            david.nault David Nault
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty