mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
fix IoUtil bug
This commit is contained in:
parent
6c17763322
commit
327502a846
@ -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)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -675,7 +675,7 @@ public class Validator {
|
||||
* 验证是否为可用邮箱地址
|
||||
*
|
||||
* @param value 值
|
||||
* @return 否为可用邮箱地址
|
||||
* @return true为可用邮箱地址
|
||||
*/
|
||||
public static boolean isEmail(CharSequence value) {
|
||||
return isMatchRegex(EMAIL, value);
|
||||
|
@ -121,7 +121,7 @@ public class TreeUtil {
|
||||
|
||||
/**
|
||||
* 获取ID对应的节点,如果有多个ID相同的节点,只返回第一个。<br>
|
||||
* 此方法只查找此节点及子节点,采用广度优先遍历。
|
||||
* 此方法只查找此节点及子节点,采用递归深度优先遍历。
|
||||
*
|
||||
* @param <T> ID类型
|
||||
* @param node 节点
|
||||
|
Loading…
x
Reference in New Issue
Block a user