fix IoUtil bug

This commit is contained in:
Looly
2020-06-15 09:11:40 +08:00
parent 6c17763322
commit 327502a846
4 changed files with 5 additions and 4 deletions

View File

@@ -601,7 +601,7 @@ public class IoUtil {
throw new IORuntimeException(e);
}
if (readLength > 0 && readLength < length) {
byte[] b2 = new byte[length];
byte[] b2 = new byte[readLength];
System.arraycopy(b, 0, b2, 0, readLength);
return b2;
} else {

View File

@@ -675,7 +675,7 @@ public class Validator {
* 验证是否为可用邮箱地址
*
* @param value 值
* @return 为可用邮箱地址
* @return true为可用邮箱地址
*/
public static boolean isEmail(CharSequence value) {
return isMatchRegex(EMAIL, value);

View File

@@ -121,7 +121,7 @@ public class TreeUtil {
/**
* 获取ID对应的节点如果有多个ID相同的节点只返回第一个。<br>
* 此方法只查找此节点及子节点,采用广度优先遍历。
* 此方法只查找此节点及子节点,采用递归深度优先遍历。
*
* @param <T> ID类型
* @param node 节点