dylanhz commented on code in PR #30065:
URL: https://github.com/apache/flink/pull/30065#discussion_r4689336909
##########
flink-core/src/main/java/org/apache/flink/util/SwarUtils.java:
##########
@@ -42,19 +42,23 @@ private SwarUtils() {}
/** Whether {@code bytes[offset, offset + len)} contains only ASCII bytes.
*/
public static boolean isAscii(byte[] bytes, int offset, int len) {
+ return asciiPrefix(bytes, offset, len) == len;
+ }
+
+ /**
+ * The number of leading ASCII bytes of {@code bytes[offset, offset +
len)}; may be up to 7
+ * bytes short when the first non-ASCII byte is in a word.
Review Comment:
The byte loop finds the exact ASCII prefix. Can we drop “may be up to 7
bytes short” from the Javadoc?
--
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]