You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2016/06/30 00:21:46 UTC
[1/2] commons-crypto git commit: Revert "try-with-resources."
Repository: commons-crypto
Updated Branches:
refs/heads/master c6320bbf6 -> 7652bfbd6
Revert "try-with-resources."
This reverts commit b11f6ffaecef327840c3f42b880937a267ac7637.
Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/67e3639c
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/67e3639c
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/67e3639c
Branch: refs/heads/master
Commit: 67e3639c4a8c9daa472864522265917303a1b228
Parents: c6320bb
Author: Gary Gregory <gg...@apache.org>
Authored: Wed Jun 29 17:21:05 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Wed Jun 29 17:21:05 2016 -0700
----------------------------------------------------------------------
.../commons/crypto/cipher/AbstractCipherTest.java | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/67e3639c/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
index 65f1472..3da0511 100644
--- a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
+++ b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
@@ -82,18 +82,18 @@ public abstract class AbstractCipherTest {
@Test
public void closeTestAfterInit() throws Exception {
- try (CryptoCipher enc = getCipher(transformations[0])) {
- enc.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
- }
+ CryptoCipher enc = getCipher(transformations[0]);
+ enc.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
+ enc.close();
}
@Test
public void reInitTest() throws Exception {
- try (CryptoCipher enc = getCipher(transformations[0])) {
- enc.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
- enc.init(Cipher.DECRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
- enc.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
- }
+ CryptoCipher enc = getCipher(transformations[0]);
+ enc.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
+ enc.init(Cipher.DECRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
+ enc.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(KEY, "AES"), new IvParameterSpec(IV));
+ enc.close();
}
@Test
[2/2] commons-crypto git commit: Revert "try-with-resources."
Posted by gg...@apache.org.
Revert "try-with-resources."
This reverts commit 9ecfae271b00a66a5ca2618b32aa59e96a165473.
Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/7652bfbd
Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/7652bfbd
Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/7652bfbd
Branch: refs/heads/master
Commit: 7652bfbd67faf4db61269c01979dcb58fa87b49b
Parents: 67e3639
Author: Gary Gregory <gg...@apache.org>
Authored: Wed Jun 29 17:21:14 2016 -0700
Committer: Gary Gregory <gg...@apache.org>
Committed: Wed Jun 29 17:21:14 2016 -0700
----------------------------------------------------------------------
.../org/apache/commons/crypto/cipher/AbstractCipherTest.java | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/7652bfbd/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
----------------------------------------------------------------------
diff --git a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
index 3da0511..affca80 100644
--- a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
+++ b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
@@ -75,9 +75,8 @@ public abstract class AbstractCipherTest {
@Test
public void closeTestNoInit() throws Exception {
- try (CryptoCipher enc = getCipher(transformations[0])) {
- // nothing
- }
+ CryptoCipher enc = getCipher(transformations[0]);
+ enc.close();
}
@Test