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 c9df01c Use final
c9df01c is described below
commit c9df01c45b649f9b1531c4f57c38a7f46805897d
Author: Gary Gregory <[email protected]>
AuthorDate: Sat Jan 14 10:52:28 2023 -0500
Use final
---
.../org/apache/commons/crypto/stream/PositionedCryptoInputStream.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
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 5a180fb..195878b 100644
---
a/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
+++
b/src/main/java/org/apache/commons/crypto/stream/PositionedCryptoInputStream.java
@@ -280,7 +280,7 @@ public class PositionedCryptoInputStream extends
CtrCryptoInputStream {
* @see #returnToPool(ByteBuffer)
*/
private ByteBuffer getBuffer() {
- ByteBuffer buffer = byteBufferPool.poll();
+ final ByteBuffer buffer = byteBufferPool.poll();
return buffer != null ? buffer :
ByteBuffer.allocateDirect(getBufferSize());
}
@@ -292,7 +292,7 @@ public class PositionedCryptoInputStream extends
CtrCryptoInputStream {
*/
@SuppressWarnings("resource") // Caller calls #returnToPool(CipherState)
private CipherState getCipherState() throws IOException {
- CipherState state = cipherStatePool.poll();
+ final CipherState state = cipherStatePool.poll();
return state != null ? state : new
CipherState(Utils.getCipherInstance(AES.CTR_NO_PADDING, properties));
}