diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2015-07-06 00:52:53 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2015-07-06 00:52:53 +0200 |
commit | 17defe556aa831e4fdb16a1e924351142a73003f (patch) | |
tree | acdd783869864831dd92650eca1bbb5720698fdc /OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java | |
parent | 539379a6297c6064c5a9e2c5450b3050958d15fd (diff) | |
download | open-keychain-17defe556aa831e4fdb16a1e924351142a73003f.tar.gz open-keychain-17defe556aa831e4fdb16a1e924351142a73003f.tar.bz2 open-keychain-17defe556aa831e4fdb16a1e924351142a73003f.zip |
cleanup, NonNull annotation, never return null in PgpDecryptVerify
Diffstat (limited to 'OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java')
-rw-r--r-- | OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java index 3457665b0..a82e16461 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/operations/ExportOperation.java @@ -21,6 +21,7 @@ package org.sufficientlysecure.keychain.operations; import android.content.Context; import android.database.Cursor; import android.net.Uri; +import android.support.annotation.NonNull; import org.spongycastle.bcpg.ArmoredOutputStream; import org.sufficientlysecure.keychain.Constants; @@ -329,6 +330,7 @@ public class ExportOperation extends BaseOperation<ExportKeyringParcel> { } + @NonNull public ExportResult execute(ExportKeyringParcel exportInput, CryptoInputParcel cryptoInput) { switch (exportInput.mExportType) { case UPLOAD_KEYSERVER: { @@ -364,8 +366,8 @@ public class ExportOperation extends BaseOperation<ExportKeyringParcel> { return exportToUri(exportInput.mMasterKeyIds, exportInput.mExportSecret, exportInput.mOutputUri); } - default: { // can't happen - return null; + default: { // can never happen, all enum types must be handled above + throw new AssertionError("must not happen, this is a bug!"); } } } |