This commit is contained in:
Looly
2023-03-27 02:02:10 +08:00
parent 16f7549c7d
commit 4fca8310e7
96 changed files with 307 additions and 315 deletions

View File

@@ -730,7 +730,7 @@ public class KeyUtil {
in = FileUtil.getInputStream(keyFile);
return readKeyStore(type, in, password);
} finally {
IoUtil.close(in);
IoUtil.closeQuietly(in);
}
}

View File

@@ -140,7 +140,7 @@ public class PemUtil {
} catch (final IOException e) {
throw new IORuntimeException(e);
} finally {
IoUtil.close(pemReader);
IoUtil.closeQuietly(pemReader);
}
}
@@ -206,7 +206,7 @@ public class PemUtil {
} catch (final IOException e) {
throw new IORuntimeException(e);
} finally {
IoUtil.close(pemWriter);
IoUtil.closeQuietly(pemWriter);
}
}
}

View File

@@ -218,7 +218,7 @@ public class Digester implements Serializable {
in = FileUtil.getInputStream(file);
return digest(in);
} finally {
IoUtil.close(in);
IoUtil.closeQuietly(in);
}
}

View File

@@ -131,7 +131,7 @@ public class Mac implements Serializable {
in = FileUtil.getInputStream(file);
return digest(in);
} finally {
IoUtil.close(in);
IoUtil.closeQuietly(in);
}
}

View File

@@ -308,9 +308,9 @@ public class SymmetricCrypto implements SymmetricEncryptor, SymmetricDecryptor,
lock.unlock();
// issue#I4EMST@Gitee
// CipherOutputStream必须关闭才能完全写出
IoUtil.close(cipherOutputStream);
IoUtil.closeQuietly(cipherOutputStream);
if (isClose) {
IoUtil.close(data);
IoUtil.closeQuietly(data);
}
}
}
@@ -361,9 +361,9 @@ public class SymmetricCrypto implements SymmetricEncryptor, SymmetricDecryptor,
lock.unlock();
// issue#I4EMST@Gitee
// CipherOutputStream必须关闭才能完全写出
IoUtil.close(cipherInputStream);
IoUtil.closeQuietly(cipherInputStream);
if (isClose) {
IoUtil.close(data);
IoUtil.closeQuietly(data);
}
}
}