yuxiqian commented on code in PR #3255:
URL: https://github.com/apache/flink-cdc/pull/3255#discussion_r1578977096


##########
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/configuration/ConfigurationUtils.java:
##########
@@ -130,7 +130,9 @@ static Duration convertToDuration(Object o) {
     }
 
     static String convertToString(Object o) {
-        if (o.getClass() == String.class) {
+        if (o == null) {

Review Comment:
   Maybe we can bring the check to `convertValue` function? Seems other 
`convertToXXX` functions also share this problem.



##########
flink-cdc-common/src/main/java/org/apache/flink/cdc/common/configuration/ConfigurationUtils.java:
##########
@@ -130,7 +130,9 @@ static Duration convertToDuration(Object o) {
     }
 
     static String convertToString(Object o) {
-        if (o.getClass() == String.class) {
+        if (o == null) {

Review Comment:
   Maybe we can bring the check to `convertValue` function? Seems other 
`convertToXXX` functions also have this problem.



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