This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-crypto.git
The following commit(s) were added to refs/heads/master by this push:
new 6918f5a Remove compiler warning and document.
6918f5a is described below
commit 6918f5a8e0145eaed057b0dae0f45ec21ced74ab
Author: Gary Gregory <[email protected]>
AuthorDate: Wed Aug 5 12:24:49 2020 -0400
Remove compiler warning and document.
---
.../java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java | 2 ++
.../java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java | 2 ++
.../org/apache/commons/crypto/stream/PositionedCryptoInputStream.java | 1 +
3 files changed, 5 insertions(+)
diff --git
a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
index 5d79dac..c23547f 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoInputStream.java
@@ -167,6 +167,7 @@ public class CtrCryptoInputStream extends CryptoInputStream
{
* @param streamOffset the start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
+ @SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoInputStream.
public CtrCryptoInputStream(final Properties props, final InputStream in,
final byte[] key,
final byte[] iv, final long streamOffset) throws IOException {
this(in, Utils.getCipherInstance(
@@ -185,6 +186,7 @@ public class CtrCryptoInputStream extends CryptoInputStream
{
* @param streamOffset the start offset in the stream.
* @throws IOException if an I/O error occurs.
*/
+ @SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoInputStream.
public CtrCryptoInputStream(final Properties props, final
ReadableByteChannel in,
final byte[] key, final byte[] iv, final long streamOffset) throws
IOException {
this(in, Utils.getCipherInstance(
diff --git
a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
index 3925c48..f8b8ff3 100644
--- a/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
+++ b/src/main/java/org/apache/commons/crypto/stream/CtrCryptoOutputStream.java
@@ -172,6 +172,7 @@ public class CtrCryptoOutputStream extends
CryptoOutputStream {
* @param streamOffset the start offset in the data.
* @throws IOException if an I/O error occurs.
*/
+ @SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoOutputStream.
public CtrCryptoOutputStream(final Properties props, final OutputStream
out,
final byte[] key, final byte[] iv, final long streamOffset) throws
IOException {
this(out, Utils.getCipherInstance(
@@ -190,6 +191,7 @@ public class CtrCryptoOutputStream extends
CryptoOutputStream {
* @param streamOffset the start offset in the data.
* @throws IOException if an I/O error occurs.
*/
+ @SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by CtrCryptoOutputStream.
public CtrCryptoOutputStream(final Properties props, final
WritableByteChannel out,
final byte[] key, final byte[] iv, final long streamOffset) throws
IOException {
this(out, Utils.getCipherInstance(
diff --git
a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
index 72ff838..4b270cd 100644
---
a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
+++
b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
@@ -71,6 +71,7 @@ public class PositionedCryptoInputStream extends
CtrCryptoInputStream {
* @param streamOffset the start offset in the data.
* @throws IOException if an I/O error occurs.
*/
+ @SuppressWarnings("resource") // The CryptoCipher returned by
getCipherInstance() is closed by PositionedCryptoInputStream.
public PositionedCryptoInputStream(final Properties props, final Input in,
final byte[] key,
final byte[] iv, final long streamOffset) throws IOException {
this(props, in, Utils.getCipherInstance("AES/CTR/NoPadding", props),