wuheng 1 жил өмнө
parent
commit
888be103de

+ 1 - 6
common/src/main/java/com/koobietech/eas/common/utils/FileManager.java

@@ -354,7 +354,7 @@ public class FileManager {
     }
     }
 
 
     /**
     /**
-     * 获取文件流
+     * 获取文件流  注意关闭文件流
      * @param filePath
      * @param filePath
      * @return
      * @return
      */
      */
@@ -363,11 +363,6 @@ public class FileManager {
         try {
         try {
             fileOutputStream = new FileInputStream(filePath);
             fileOutputStream = new FileInputStream(filePath);
         } catch (FileNotFoundException e) {}
         } catch (FileNotFoundException e) {}
-        finally {
-            try {
-                fileOutputStream.close();
-            } catch (IOException e) {}
-        }
         return fileOutputStream;
         return fileOutputStream;
     }
     }
 }
 }

+ 1 - 6
common/src/test/java/com/koobietech/eas/common/utils/PasswordManagerTest.java

@@ -1,18 +1,13 @@
 package com.koobietech.eas.common.utils;
 package com.koobietech.eas.common.utils;
 
 
 
 
-import java.util.Date;
-
 class PasswordManagerTest {
 class PasswordManagerTest {
 
 
 
 
 
 
     public static void main(String[] args) {
     public static void main(String[] args) {
-
-        String property = System.getProperty("user.dir");
-        System.out.println( property );
+        // 创建一个接口
 
 
     }
     }
 
 
-
 }
 }

+ 1 - 5
service/src/main/java/com/koobietech/eas/service/impl/EasArchivesFilesServiceImpl.java

@@ -74,11 +74,7 @@ public class EasArchivesFilesServiceImpl implements EasArchivesFilesService {
         InputStream resourceAsStream = null;
         InputStream resourceAsStream = null;
         try {
         try {
             resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(filePath);
             resourceAsStream = this.getClass().getClassLoader().getResourceAsStream(filePath);
-        } catch (Exception e) {}finally {
-            try {
-                resourceAsStream.close();
-            } catch (IOException e) {}
-        }
+        } catch (Exception e) {}
         return resourceAsStream;
         return resourceAsStream;
     }
     }