twalthr commented on a change in pull request #18878:
URL: https://github.com/apache/flink/pull/18878#discussion_r817732119



##########
File path: 
flink-table/flink-table-planner/src/main/java/org/apache/flink/table/planner/plan/nodes/exec/serde/JsonSerdeUtil.java
##########
@@ -103,8 +103,14 @@ public static boolean hasJsonCreatorAnnotation(Class<?> 
clazz) {
         OBJECT_MAPPER_INSTANCE.registerModule(createFlinkTableJacksonModule());
     }
 
-    /** Get the {@link ObjectMapper} instance. */
-    public static ObjectMapper getObjectMapper() {
+    /**
+     * Get the {@link ObjectMapper} instance.
+     *
+     * <p>This is not exposed outside this package to avoid bad usages, like 
adding new modules. If
+     * you need to read and write json, just use {@link 
#createObjectWriter(SerdeContext)} and
+     * {@link #createObjectReader(SerdeContext)}.
+     */
+    static ObjectMapper getObjectMapper() {

Review comment:
       Do we actually need to expose it? All usages can either use the 
`ObjectMapper` of `JsonSerdeTestUtil` or are SerdeTests that need an update 
anyway to `toJson/toObject`.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to