You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/08/19 22:18:22 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1293: Replace org.codehaus.jackson with FasterXML.jackson

jiajunwang commented on a change in pull request #1293:
URL: https://github.com/apache/helix/pull/1293#discussion_r473379970



##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/datamodel/serializer/ZNRecordSerializer.java
##########
@@ -24,20 +24,22 @@
 import java.util.List;
 import java.util.Map;
 
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.fasterxml.jackson.databind.SerializationFeature;
 import org.apache.helix.zookeeper.datamodel.ZNRecord;
 import org.apache.helix.zookeeper.util.GZipCompressionUtil;
 import org.apache.helix.zookeeper.util.ZNRecordUtil;
 import org.apache.helix.zookeeper.zkclient.exception.ZkMarshallingError;
 import org.apache.helix.zookeeper.zkclient.serialize.ZkSerializer;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 
 public class ZNRecordSerializer implements ZkSerializer {
   private static Logger LOG = LoggerFactory.getLogger(ZNRecordSerializer.class);
+  private static ObjectMapper mapper = new ObjectMapper();

Review comment:
       I guess you have done so. Just in case, please search all the ObjectMapper objects to ensure all of them are static.

##########
File path: zookeeper-api/src/main/java/org/apache/helix/zookeeper/datamodel/serializer/JacksonPayloadSerializer.java
##########
@@ -22,10 +22,13 @@
 import java.io.ByteArrayInputStream;
 import java.io.StringWriter;
 
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.MapperFeature;
+import com.fasterxml.jackson.databind.SerializationFeature;
 import org.apache.helix.zookeeper.exception.ZkClientException;
-import org.codehaus.jackson.map.DeserializationConfig;
-import org.codehaus.jackson.map.ObjectMapper;
-import org.codehaus.jackson.map.SerializationConfig;
+import com.fasterxml.jackson.databind.DeserializationConfig;

Review comment:
       nit, it seems to need re-ordering.

##########
File path: helix-core/helix-core-1.0.2-SNAPSHOT.ivy
##########
@@ -53,8 +53,8 @@ under the License.
         <artifact name="slf4j-log4j12" ext="jar"/>
     </dependency>
     <dependency org="org.apache.zookeeper" name="zookeeper" rev="3.4.13" conf="compile->compile(default);runtime->runtime(default);default->default"/>
-    <dependency org="org.codehaus.jackson" name="jackson-core-asl" rev="1.8.5" conf="compile->compile(default);runtime->runtime(default);default->default"/>
-    <dependency org="org.codehaus.jackson" name="jackson-mapper-asl" rev="1.8.5" conf="compile->compile(default);runtime->runtime(default);default->default"/>
+		<dependency org="com.fasterxml.jackson.core" name="jackson-databind" rev="2.11.0" force="true" conf="compile->compile(*),master(*);runtime->runtime(*)"/>

Review comment:
       Just curious, what's the "master(*)" here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org