mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
fix code
This commit is contained in:
@@ -730,7 +730,7 @@ public class KeyUtil {
|
||||
in = FileUtil.getInputStream(keyFile);
|
||||
return readKeyStore(type, in, password);
|
||||
} finally {
|
||||
IoUtil.close(in);
|
||||
IoUtil.closeQuietly(in);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -218,7 +218,7 @@ public class Digester implements Serializable {
|
||||
in = FileUtil.getInputStream(file);
|
||||
return digest(in);
|
||||
} finally {
|
||||
IoUtil.close(in);
|
||||
IoUtil.closeQuietly(in);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -131,7 +131,7 @@ public class Mac implements Serializable {
|
||||
in = FileUtil.getInputStream(file);
|
||||
return digest(in);
|
||||
} finally {
|
||||
IoUtil.close(in);
|
||||
IoUtil.closeQuietly(in);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user