Github user cammckenzie commented on a diff in the pull request:

    https://github.com/apache/curator/pull/208#discussion_r108049783
  
    --- Diff: 
curator-x-discovery/src/main/java/org/apache/curator/x/discovery/details/JsonInstanceSerializer.java
 ---
    @@ -16,30 +16,57 @@
      * specific language governing permissions and limitations
      * under the License.
      */
    +
     package org.apache.curator.x.discovery.details;
     
    +import com.google.common.annotations.VisibleForTesting;
     import org.apache.curator.x.discovery.ServiceInstance;
    +import org.codehaus.jackson.map.DeserializationConfig;
     import org.codehaus.jackson.map.ObjectMapper;
     import org.codehaus.jackson.type.JavaType;
    -import java.io.ByteArrayOutputStream;
     
     /**
      * A serializer that uses Jackson to serialize/deserialize as JSON. 
IMPORTANT: The instance
      * payload must support Jackson
      */
     public class JsonInstanceSerializer<T> implements InstanceSerializer<T>
     {
    -    private final ObjectMapper      mapper;
    -    private final Class<T>          payloadClass;
    -    private final JavaType          type;
    +    private final ObjectMapper mapper;
    +    private final Class<T> payloadClass;
    +    private final boolean compatibleSerializationMode;
    +    private final JavaType type;
     
         /**
          * @param payloadClass used to validate payloads when deserializing
          */
         public JsonInstanceSerializer(Class<T> payloadClass)
         {
    +        this(payloadClass, false, false);
    --- End diff --
    
    Doesn't this approach imply that moving to Curator 2.12.x requires you to 
change the code base to not break backwards compatibility? Shouldn't the 
default be to be in compatibility mode? Then you can just upgrade to 2.12.x and 
everything will still work, but you need to change the code base to pick up the 
fix for CURATOR-275?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to