aboutsummaryrefslogtreecommitdiffstats
path: root/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java
diff options
context:
space:
mode:
authorDominik Schürmann <dominik@dominikschuermann.de>2014-10-09 00:59:45 +0200
committerDominik Schürmann <dominik@dominikschuermann.de>2014-10-09 00:59:45 +0200
commitb3f56c927b47565bdaa7e3b4ea2a8a214aa56652 (patch)
tree2282eaab83733ea4bb1524052872c14fc6ec58ab /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java
parenta13bcbbb5b8b6e9e6998d561182ded77d0602ae2 (diff)
downloadopen-keychain-b3f56c927b47565bdaa7e3b4ea2a8a214aa56652.tar.gz
open-keychain-b3f56c927b47565bdaa7e3b4ea2a8a214aa56652.tar.bz2
open-keychain-b3f56c927b47565bdaa7e3b4ea2a8a214aa56652.zip
Revert "Replace PgpGeneralException with NotFoundException where appropriate"
This reverts commit 49b4ff63122988dc1587844e6b4b2ee5d0855385.
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java')
-rw-r--r--OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java16
1 files changed, 8 insertions, 8 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java
index cc0de1e34..08b7316aa 100644
--- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java
+++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/CanonicalizedKeyRing.java
@@ -19,7 +19,7 @@
package org.sufficientlysecure.keychain.pgp;
import org.spongycastle.openpgp.PGPKeyRing;
-import org.sufficientlysecure.keychain.provider.ProviderHelper.NotFoundException;
+import org.sufficientlysecure.keychain.pgp.exception.PgpGeneralException;
import org.sufficientlysecure.keychain.util.IterableIterator;
import java.io.IOException;
@@ -56,11 +56,11 @@ public abstract class CanonicalizedKeyRing extends KeyRing {
return getRing().getPublicKey().getFingerprint();
}
- public String getPrimaryUserId() throws NotFoundException {
+ public String getPrimaryUserId() throws PgpGeneralException {
return getPublicKey().getPrimaryUserId();
}
- public String getPrimaryUserIdWithFallback() throws NotFoundException {
+ public String getPrimaryUserIdWithFallback() throws PgpGeneralException {
return getPublicKey().getPrimaryUserIdWithFallback();
}
@@ -87,24 +87,24 @@ public abstract class CanonicalizedKeyRing extends KeyRing {
return creationDate.after(now) || (expiryDate != null && expiryDate.before(now));
}
- public boolean canCertify() throws NotFoundException {
+ public boolean canCertify() throws PgpGeneralException {
return getRing().getPublicKey().isEncryptionKey();
}
- public long getEncryptId() throws NotFoundException {
+ public long getEncryptId() throws PgpGeneralException {
for(CanonicalizedPublicKey key : publicKeyIterator()) {
if (key.canEncrypt() && key.isValid()) {
return key.getKeyId();
}
}
- throw new NotFoundException("No valid encryption key found!");
+ throw new PgpGeneralException("No valid encryption key found!");
}
- public boolean hasEncrypt() throws NotFoundException {
+ public boolean hasEncrypt() throws PgpGeneralException {
try {
getEncryptId();
return true;
- } catch(NotFoundException e) {
+ } catch(PgpGeneralException e) {
return false;
}
}