commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebb <seb...@gmail.com>
Subject Re: [1/2] commons-crypto git commit: try-with-resources.
Date Thu, 30 Jun 2016 00:20:04 GMT
On 30 June 2016 at 01:08,  <ggregory@apache.org> wrote:
> Repository: commons-crypto
> Updated Branches:
>   refs/heads/master bd9dfcd71 -> b11f6ffae
>
>
> try-with-resources.
>
> Project: http://git-wip-us.apache.org/repos/asf/commons-crypto/repo
> Commit: http://git-wip-us.apache.org/repos/asf/commons-crypto/commit/9ecfae27
> Tree: http://git-wip-us.apache.org/repos/asf/commons-crypto/tree/9ecfae27
> Diff: http://git-wip-us.apache.org/repos/asf/commons-crypto/diff/9ecfae27
>
> Branch: refs/heads/master
> Commit: 9ecfae271b00a66a5ca2618b32aa59e96a165473
> Parents: bd9dfcd
> Author: Gary Gregory <ggregory@apache.org>
> Authored: Wed Jun 29 17:07:28 2016 -0700
> Committer: Gary Gregory <ggregory@apache.org>
> Committed: Wed Jun 29 17:07:28 2016 -0700
>
> ----------------------------------------------------------------------
>  .../org/apache/commons/crypto/cipher/AbstractCipherTest.java    | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> ----------------------------------------------------------------------
>
>
> http://git-wip-us.apache.org/repos/asf/commons-crypto/blob/9ecfae27/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 affca80..3da0511 100644
> --- a/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
> +++ b/src/test/java/org/apache/commons/crypto/cipher/AbstractCipherTest.java
> @@ -75,8 +75,9 @@ public abstract class AbstractCipherTest {
>
>      @Test
>      public void closeTestNoInit() throws Exception {
> -        CryptoCipher enc = getCipher(transformations[0]);
> -        enc.close();
> +        try (CryptoCipher enc = getCipher(transformations[0])) {
> +            // nothing
> +        }

-1

These are specifically designed to test init and close.

>      }
>
>      @Test
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message