From 472fc1b5980db8cd69c77a5c1bcb8aded3d3b3a6 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期二, 05 十一月 2024 19:05:48 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile

---
 ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java |   11 +++++++----
 1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java
index b08ca9d..68aa7ec 100644
--- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java
+++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java
@@ -61,12 +61,15 @@
             certStream = new FileInputStream(this.privateKeyPath);
             certData = IOUtils.toByteArray(certStream);
         } catch (IOException e) {
+            e.printStackTrace();
             throw new RuntimeException("私钥文件未找到");
         }finally {
-            try {
-                certStream.close();
-            } catch (IOException e) {
-                log.error("私钥流关闭异常");
+            if(null != certStream){
+                try {
+                    certStream.close();
+                } catch (IOException e) {
+                    log.error("私钥流关闭异常");
+                }
             }
         }
         return new ByteArrayInputStream(certData);

--
Gitblit v1.7.1