healchow commented on code in PR #7869:
URL: https://github.com/apache/inlong/pull/7869#discussion_r1168630631
##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/stream/StreamFieldTypeCellValidator.java:
##########
@@ -38,4 +38,14 @@ public List<String> constraint() {
return new ArrayList<>(STREAM_FIELD_TYPES);
}
+ @Override
+ public boolean validate(String value) {
+ return STREAM_FIELD_TYPES.contains(value);
+ }
+
+ @Override
+ public String getInvalidTip() {
+ return "StreamField type must one of " + STREAM_FIELD_TYPES;
Review Comment:
`must one of` -> `must be one of`.
And also, extracting a String constant, then using `String.format()` to
append the `STREAM_FIELD_TYPES` maybe is a good practice.
--
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]