This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 5ce01771e [Manager][INLONG-6361] Fix the deserialization exception
with Jackson's version below 2.13 (#6362)
5ce01771e is described below
commit 5ce01771eed1870fbf142a623eb3e319c259aa24
Author: woofyzhao <[email protected]>
AuthorDate: Wed Nov 2 11:09:26 2022 +0800
[Manager][INLONG-6361] Fix the deserialization exception with Jackson's
version below 2.13 (#6362)
---
.../org/apache/inlong/manager/common/enums/SortStatus.java | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/SortStatus.java
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/SortStatus.java
index 183b2d4a9..c4c66558d 100644
---
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/SortStatus.java
+++
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/enums/SortStatus.java
@@ -17,6 +17,7 @@
package org.apache.inlong.manager.common.enums;
+import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;
/**
@@ -53,4 +54,14 @@ public enum SortStatus {
return description;
}
+ @JsonCreator
+ public static SortStatus forCode(int code) {
+ for (SortStatus status : values()) {
+ if (status.getCode() == code) {
+ return status;
+ }
+ }
+ throw new IllegalStateException(String.format("Illegal code=%s for
SortStatus", code));
+ }
+
}