From f1e67faa0bebbde46a10b212d06d73392626fd12 Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sun, 31 Mar 2019 13:05:48 +0200 Subject: [PATCH] WalletTest: Be more specific about the expected exception in encryptionDecryptionBadPassword(). --- core/src/test/java/org/bitcoinj/wallet/WalletTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java index 8ace07f7..7003fc77 100644 --- a/core/src/test/java/org/bitcoinj/wallet/WalletTest.java +++ b/core/src/test/java/org/bitcoinj/wallet/WalletTest.java @@ -2024,8 +2024,10 @@ public class WalletTest extends TestWithWallet { try { encryptedWallet.decrypt(wrongAesKey); fail("Incorrectly decoded wallet with wrong password"); - } catch (KeyCrypterException ede) { - // Expected. + } catch (KeyCrypterException.InvalidCipherText e) { + // Expected, either this... + } catch (KeyCrypterException.PublicPrivateMismatch e) { + // ...or this. } }