mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-02-18 22:26:22 +08:00
🎨 优化代码
This commit is contained in:
@@ -8,6 +8,7 @@ import com.google.gson.annotations.SerializedName;
|
||||
import com.thoughtworks.xstream.annotations.XStreamAlias;
|
||||
import com.thoughtworks.xstream.annotations.XStreamConverter;
|
||||
import lombok.Data;
|
||||
import me.chanjar.weixin.common.error.WxRuntimeException;
|
||||
import me.chanjar.weixin.common.util.xml.XStreamCDataConverter;
|
||||
import org.apache.commons.io.IOUtils;
|
||||
|
||||
@@ -174,7 +175,7 @@ public class WxMaMessage implements Serializable {
|
||||
return fromEncryptedXml(IOUtils.toString(is, StandardCharsets.UTF_8), wxMaConfig,
|
||||
timestamp, nonce, msgSignature);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new WxRuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -188,7 +189,7 @@ public class WxMaMessage implements Serializable {
|
||||
String plainText = new WxMaCryptUtils(config).decrypt(encryptedMessage.getEncrypt());
|
||||
return fromJson(plainText);
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new WxRuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +197,7 @@ public class WxMaMessage implements Serializable {
|
||||
try {
|
||||
return fromEncryptedJson(IOUtils.toString(inputStream, StandardCharsets.UTF_8), config);
|
||||
} catch (IOException e) {
|
||||
throw new RuntimeException(e);
|
||||
throw new WxRuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user