From bd931e1dced09acb8a9f424737e7ba451e6d9dd6 Mon Sep 17 00:00:00 2001 From: Dave Date: Sun, 28 Jun 2015 21:32:24 +0200 Subject: [PATCH] removed unnecessary catch --- src/nodash/test/NoUtilTest.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/nodash/test/NoUtilTest.java b/src/nodash/test/NoUtilTest.java index b4a2d5a..250504d 100644 --- a/src/nodash/test/NoUtilTest.java +++ b/src/nodash/test/NoUtilTest.java @@ -234,13 +234,7 @@ public class NoUtilTest { @Test public void testEncryptionDecryptionRSA() throws NoSuchAlgorithmException, NoSuchProviderException, InvalidKeyException, IllegalBlockSizeException, BadPaddingException { - KeyPairGenerator kpg; - try { - kpg = KeyPairGenerator.getInstance(NoUtil.KEYPAIR_ALGORITHM); - } catch (NoSuchAlgorithmException e) { - throw new NoDashFatalException("Value for KEYPAIR_ALGORITHM is not valid.", e); - } - + KeyPairGenerator kpg = KeyPairGenerator.getInstance(NoUtil.KEYPAIR_ALGORITHM); kpg.initialize(NoUtil.RSA_STRENGTH, SecureRandom.getInstance(NoUtil.SECURERANDOM_ALGORITHM, NoUtil.SECURERANDOM_PROVIDER));