mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix code
This commit is contained in:
parent
6348b3e4e3
commit
41cb8a6db7
@ -68,11 +68,12 @@ public class SerializeUtil {
|
|||||||
* 注意!!! 此方法不会检查反序列化安全,可能存在反序列化漏洞风险!!!
|
* 注意!!! 此方法不会检查反序列化安全,可能存在反序列化漏洞风险!!!
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
* @param <T> 对象类型
|
* @param <T> 对象类型
|
||||||
* @param bytes 反序列化的字节码
|
* @param bytes 反序列化的字节码
|
||||||
|
* @param acceptClasses 读取对象类型
|
||||||
* @return 反序列化后的对象
|
* @return 反序列化后的对象
|
||||||
*/
|
*/
|
||||||
public static <T> T deserialize(final byte[] bytes) {
|
public static <T> T deserialize(final byte[] bytes, final Class<?>... acceptClasses) {
|
||||||
return IoUtil.readObj(new ByteArrayInputStream(bytes));
|
return IoUtil.readObj(new ByteArrayInputStream(bytes), acceptClasses);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user