优化代码

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.open.bean.message;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.nio.charset.StandardCharsets;
import org.apache.commons.io.IOUtils;
@ -99,7 +100,7 @@ public class WxOpenXmlMessage implements Serializable {
public static WxOpenXmlMessage fromEncryptedXml(InputStream is, WxOpenConfigStorage wxOpenConfigStorage,
String timestamp, String nonce, String msgSignature) {
try {
return fromEncryptedXml(IOUtils.toString(is, "UTF-8"),
return fromEncryptedXml(IOUtils.toString(is, StandardCharsets.UTF_8),
wxOpenConfigStorage, timestamp, nonce, msgSignature);
} catch (IOException e) {
throw new RuntimeException(e);