From cba96d4cbd3ddd8af20b2d65d1f430c75f667821 Mon Sep 17 00:00:00 2001
From: lxw <810412026@qq.com>
Date: 星期三, 22 十一月 2023 11:43:43 +0800
Subject: [PATCH] 2.2.9资源未释放

---
 src/main/java/com/whyc/service/Ld9testdataService.java |   13 +++++++------
 1 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/main/java/com/whyc/service/Ld9testdataService.java b/src/main/java/com/whyc/service/Ld9testdataService.java
index 7e401ca..f3ca4b4 100644
--- a/src/main/java/com/whyc/service/Ld9testdataService.java
+++ b/src/main/java/com/whyc/service/Ld9testdataService.java
@@ -160,13 +160,14 @@
             } catch (IOException e) {
                 e.printStackTrace();
             } finally {
-                try {
-                    out.flush();
-                    out.close();
-                } catch (IOException e) {
-                    e.printStackTrace();
+                if(out!=null){
+                    try {
+                        out.flush();
+                        out.close();
+                    } catch (IOException e) {
+                        e.printStackTrace();
+                    }
                 }
-
             }
         });
         return true;

--
Gitblit v1.9.1