diff options
Diffstat (limited to 'OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConversionHelper.java')
-rw-r--r-- | OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConversionHelper.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConversionHelper.java b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConversionHelper.java index 1f8dec7a1..7c25c2c2a 100644 --- a/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConversionHelper.java +++ b/OpenPGP-Keychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpConversionHelper.java @@ -65,14 +65,16 @@ public class PgpConversionHelper { try { while ((obj = factory.nextObject()) != null) { PGPSecretKey secKey = null; - if(obj instanceof PGPSecretKey) { - if ((secKey = (PGPSecretKey)obj ) == null) { + if (obj instanceof PGPSecretKey) { + secKey = (PGPSecretKey) obj; + if (secKey == null) { Log.e(Constants.TAG, "No keys given!"); } keys.add(secKey); - } else if(obj instanceof PGPSecretKeyRing) { //master keys are sent as keyrings + } else if (obj instanceof PGPSecretKeyRing) { //master keys are sent as keyrings PGPSecretKeyRing keyRing = null; - if ((keyRing = (PGPSecretKeyRing)obj) == null) { + keyRing = (PGPSecretKeyRing) obj; + if (keyRing == null) { Log.e(Constants.TAG, "No keys given!"); } @SuppressWarnings("unchecked") |