fix-格式化代码, 删除getBytes()多余参数

This commit is contained in:
zangzihe 2022-11-18 13:59:30 +08:00
parent c9d3a97461
commit bd84ce3d39
2 changed files with 2 additions and 4 deletions

View File

@ -28,8 +28,7 @@ public class RepeatedlyRequestWrapper extends HttpServletRequestWrapper {
request.setCharacterEncoding(Constants.UTF8);
response.setCharacterEncoding(Constants.UTF8);
body = StrUtil.str(IoUtil.readBytes(request.getInputStream(), false), StandardCharsets.UTF_8)
.getBytes(StandardCharsets.UTF_8);
body = StrUtil.str(IoUtil.readBytes(request.getInputStream(), false), StandardCharsets.UTF_8).getBytes();
}
@Override

View File

@ -51,7 +51,7 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
}
// 为空直接返回
String json = StrUtil.str(IoUtil.readBytes(super.getInputStream(),false), StandardCharsets.UTF_8);
String json = StrUtil.str(IoUtil.readBytes(super.getInputStream(), false), StandardCharsets.UTF_8);
if (StringUtils.isEmpty(json)) {
return super.getInputStream();
}
@ -89,7 +89,6 @@ public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper {
/**
* 是否是Json请求
*
*/
public boolean isJsonRequest() {
String header = super.getHeader(HttpHeaders.CONTENT_TYPE);