wu-sheng commented on a change in pull request #3357: ADD: add operationName
length threshold
URL: https://github.com/apache/skywalking/pull/3357#discussion_r318401036
##########
File path:
apm-commons/apm-util/src/main/java/org/apache/skywalking/apm/util/StringUtil.java
##########
@@ -62,4 +64,11 @@ public static boolean substringMatch(CharSequence str, int
index, CharSequence s
}
return true;
}
+
+ public static String cut(String str, int threshold) {
+ if (isEmpty(str) || str.getBytes().length <= threshold) {
Review comment:
Why don't use `String#Length` directly?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services