fuweng11 commented on code in PR #9012:
URL: https://github.com/apache/inlong/pull/9012#discussion_r1352116923


##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/util/ValidationUtils.java:
##########
@@ -43,4 +43,39 @@ public static void validate(Validator validator, Object 
object, Class<?>... grou
         }
     }
 
+    /**
+     * Extracts the hostname and validates the port from a JDBC URL with the 
specified prefix.
+     *
+     * @param fullUrl The full JDBC URL to extract the hostname and port from
+     * @param prefix  The expected prefix of the JDBC URL
+     * @throws Exception If the URL format is invalid or the port is invalid
+     */
+    public static void extractHostAndValidatePortFromJdbcUrl(String fullUrl, 
String prefix) throws Exception {

Review Comment:
   Put into `UrlVerificationUtils`. `ValidationUtils` is used to verify object 
properties.



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