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

JsonValueSerializerWrapper does not support decoding via TypeRef

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 3.2.5, 3.1.8
    • 3.1.5, 3.1.6, 3.2.0, 3.2.1, 3.2.2, 3.2.3, 3.1.7, 3.2.4
    • None
    • None
    • 1

    Description

      Community member anilb reports on the Couchbase Forums:

      Looks starting from version 3.1.5 of the client the , when a customer json serializer is provided, the sdk is wrapping the serializer in JsonValueSerializerWrapper, and this did not have an implementation for the method that take a TypeRef object as input. This causing the above error.

      <T> T deserialize(TypeRef<T> target, byte[] input)

      the initialization code in ClusterEnvironment

      private ClusterEnvironment(ClusterEnvironment.Builder builder) {
      super(builder);
      *this.jsonSerializer = (JsonSerializer)(builder.jsonSerializer != null ? new JsonValueSerializerWrapper(builder.jsonSerializer) : this.newDefaultSerializer(builder.cryptoManager));*
      this.transcoder = (Transcoder)CbObjects.defaultIfNull(builder.transcoder, () ->

      { return JsonTranscoder.create(this.jsonSerializer); }

      );
      this.cryptoManager = Optional.ofNullable(builder.cryptoManager);
      }

      Attachments

        Issue Links

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

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty