tomsun28 commented on code in PR #3483:
URL: https://github.com/apache/hertzbeat/pull/3483#discussion_r2159772875
##########
hertzbeat-common/src/main/java/org/apache/hertzbeat/common/util/CommonUtil.java:
##########
@@ -96,6 +98,18 @@ public static boolean isNumeric(String str) {
return NUMBER_PATTERN.matcher(str).matches();
}
+ /**
+ * whether the string is Long
+ * @param str string
+ * @return boolean
+ */
+ public static boolean isLong(String str) {
+ if (StringUtils.isBlank(str)) {
+ return false;
+ }
+ return LONG_PATTERN.matcher(str).matches();
+ }
Review Comment:
hi can you help add some unit test cases?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]