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

@ -3,7 +3,7 @@
-------------------------------------------------------------------------------------------------------------
## 5.3.8 (2020-06-12)
## 5.3.8 (2020-06-15)
### 新特性
* 【core 】 增加ISO8601日期格式issue#904@Github
@ -15,6 +15,7 @@
* 【json 】 修复append方法导致的JSONConfig传递失效问题issue#906@Github
* 【core 】 修复CollUtil.subtractToList判断错误pr#915@Github
* 【poi 】 修复WordWriter写表格问题pr#914@Github
* 【core 】 修复IoUtil.readBytes缓存数组长度问题issue#I1KIUE@Github
-------------------------------------------------------------------------------------------------------------

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