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

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          david.nault David Nault created issue -
          david.nault David Nault made changes -
          Field Original Value New Value
          Status New [ 10003 ] Open [ 1 ]
          david.nault David Nault made changes -
          Sprint SDK34: CB++, OBO, Connect Prep [ 1717 ]
          david.nault David Nault made changes -
          Fix Version/s 3.2.1 [ 17634 ]
          david.nault David Nault made changes -
          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.
          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:*
          {quote}
          contentAsObject() and contentAsArray() no longer fail when a version of Jackson prior to 2.8.0 is on the class path.
          {quote}

           
          david.nault David Nault made changes -
          Link This issue relates to CBSE-10602 [ CBSE-10602 ]
          david.nault David Nault made changes -
          Resolution Fixed [ 1 ]
          Status Open [ 1 ] Resolved [ 5 ]

          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