summaryrefslogtreecommitdiff
path: root/src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java
diff options
context:
space:
mode:
authorKeuin <[email protected]>2020-08-02 18:31:50 +0800
committerkeuin <[email protected]>2020-08-02 18:31:50 +0800
commitd9c2af035ac2edb68bc8b6a1f94b7c772c3509c8 (patch)
tree4a27dd9a313090ae75d35e4d27d5bdd40b1eb218 /src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java
parentf09d420df609194a17e9d9ec63d710df8135aa8e (diff)
Refactor & object tree impl. stage 1
Diffstat (limited to 'src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java')
-rw-r--r--src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java b/src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java
index 11b912e..0ca8da3 100644
--- a/src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java
+++ b/src/main/java/com/keuin/kbackupfabric/util/ZipUtil.java
@@ -68,11 +68,11 @@ public final class ZipUtil {
* @param zipPath 压缩文件保存的路径。注意:zipPath不能是srcPath路径下的子文件夹
* @param zipFileName 压缩文件名
* @throws IOException IO Error
- * @throws ZipUtilException General exception, such as loop recursion or invalid input.
+ * @throws ZipUtilException General exception, such as loop recursion.
*/
public static void makeBackupZip(String srcPath, String zipPath, String zipFileName, BackupMetadata backupMetadata) throws IOException, ZipUtilException {
- if (srcPath.isEmpty() || zipPath.isEmpty() || zipFileName.isEmpty()) {
- throw new ZipUtilException("Parameter for zip() contains null.");
+ if (srcPath == null || zipPath == null || zipFileName == null || backupMetadata == null || srcPath.isEmpty() || zipPath.isEmpty() || zipFileName.isEmpty()) {
+ throw new IllegalArgumentException("Parameter for zip() contains null.");
}
CheckedOutputStream checkedOutputStream;
ZipOutputStream zipOutputStream = null;