优化代码

This commit is contained in:
Binary Wang
2018-12-21 11:32:13 +08:00
parent 3969124ae5
commit b17d06cc12
4 changed files with 8 additions and 8 deletions

View File

@ -3,6 +3,7 @@ package me.chanjar.weixin.mp.bean.message;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
import java.util.Map;
import org.apache.commons.io.IOUtils;
@ -662,7 +663,7 @@ public class WxMpXmlMessage implements Serializable {
public static WxMpXmlMessage fromEncryptedXml(InputStream is, WxMpConfigStorage wxMpConfigStorage, String timestamp,
String nonce, String msgSignature) {
try {
return fromEncryptedXml(IOUtils.toString(is, "UTF-8"), wxMpConfigStorage, timestamp, nonce, msgSignature);
return fromEncryptedXml(IOUtils.toString(is, StandardCharsets.UTF_8), wxMpConfigStorage, timestamp, nonce, msgSignature);
} catch (IOException e) {
throw new RuntimeException(e);
}