Skip to content

Commit

Permalink
[FLINK-34496] Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
zentol committed Feb 23, 2024
1 parent 2d78c10 commit 6c8f3a0
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@
import org.apache.flink.table.types.logical.RowType;
import org.apache.flink.util.jackson.JacksonMapperFactory;

import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.annotation.JsonCreator;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonGenerator;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.JsonParser;
import org.apache.flink.shaded.jackson2.com.fasterxml.jackson.core.ObjectCodec;
Expand All @@ -70,26 +69,12 @@
import org.apache.calcite.rex.RexWindowBound;

import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.util.Optional;

/** A utility class that provide abilities for JSON serialization and deserialization. */
@Internal
public class JsonSerdeUtil {

/** Return true if the given class's constructors have @JsonCreator annotation, else false. */
public static boolean hasJsonCreatorAnnotation(Class<?> clazz) {
for (Constructor<?> constructor : clazz.getDeclaredConstructors()) {
for (Annotation annotation : constructor.getAnnotations()) {
if (annotation instanceof JsonCreator) {
return true;
}
}
}
return false;
}

/**
* Object mapper shared instance to serialize and deserialize the plan. Note that creating and
* copying of object mappers is expensive and should be avoided.
Expand Down

0 comments on commit 6c8f3a0

Please sign in to comment.