diff options
author | Vincent Breitmoser <valodim@mugenguild.com> | 2014-07-11 13:37:31 +0200 |
---|---|---|
committer | Vincent Breitmoser <valodim@mugenguild.com> | 2014-07-11 13:45:06 +0200 |
commit | 26f6d58284d7665aa810e0d6a219e1191166e349 (patch) | |
tree | bbac36487ec1558f5e2a2042929738ed96ad62ba | |
parent | 4da273ac16fc93524bc6212e2b0477904155a4f5 (diff) | |
download | open-keychain-26f6d58284d7665aa810e0d6a219e1191166e349.tar.gz open-keychain-26f6d58284d7665aa810e0d6a219e1191166e349.tar.bz2 open-keychain-26f6d58284d7665aa810e0d6a219e1191166e349.zip |
get rid of some inspection warnings
4 files changed, 7 insertions, 11 deletions
diff --git a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/tests/PgpKeyOperationTest.java b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/tests/PgpKeyOperationTest.java index b8aa1328f..5ebb7b593 100644 --- a/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/tests/PgpKeyOperationTest.java +++ b/OpenKeychain-Test/src/test/java/org/sufficientlysecure/keychain/tests/PgpKeyOperationTest.java @@ -11,7 +11,6 @@ import org.robolectric.*; import org.robolectric.shadows.ShadowLog; import org.spongycastle.bcpg.BCPGInputStream; import org.spongycastle.bcpg.Packet; -import org.spongycastle.bcpg.SecretKeyPacket; import org.spongycastle.bcpg.SecretSubkeyPacket; import org.spongycastle.bcpg.SignaturePacket; import org.spongycastle.bcpg.UserIDPacket; @@ -147,7 +146,7 @@ public class PgpKeyOperationTest { parcel.mFingerprint = ring.getFingerprint(); parcel.addSubKeys.add(new SubkeyAdd(algorithm.rsa, 1024, KeyFlags.SIGN_DATA, null)); - UncachedKeyRing modified = applyModificationWithChecks(parcel, ring, onlyA, onlyB); + applyModificationWithChecks(parcel, ring, onlyA, onlyB); Assert.assertEquals("no extra packets in original", 0, onlyA.size()); Assert.assertEquals("exactly two extra packets in modified", 2, onlyB.size()); @@ -179,7 +178,7 @@ public class PgpKeyOperationTest { parcel.revokeSubKeys.add(it.next().getKeyId()); } - UncachedKeyRing modified = applyModificationWithChecks(parcel, ring, onlyA, onlyB); + applyModificationWithChecks(parcel, ring, onlyA, onlyB); Assert.assertEquals("no extra packets in original", 0, onlyA.size()); Assert.assertEquals("exactly one extra packet in modified", 1, onlyB.size()); @@ -197,7 +196,7 @@ public class PgpKeyOperationTest { } @Test - public void testUserIdRevokeReadd() throws Exception { + public void testUserIdRevokeRead() throws Exception { UncachedKeyRing modified; String uid = ring.getPublicKey().getUnorderedUserIds().get(1); @@ -232,8 +231,7 @@ public class PgpKeyOperationTest { parcel.mFingerprint = ring.getFingerprint(); parcel.addUserIds.add(uid); - modified = applyModificationWithChecks( - parcel, modified, onlyA, onlyB, true, false); + applyModificationWithChecks(parcel, modified, onlyA, onlyB, true, false); Assert.assertEquals("exactly two outdated packets in original", 2, onlyA.size()); Assert.assertEquals("exactly one extra packet in modified", 1, onlyB.size()); @@ -411,6 +409,7 @@ public class PgpKeyOperationTest { ArrayList onlyA = new ArrayList<RawPacket>(); ArrayList onlyB = new ArrayList<RawPacket>(); + //noinspection unchecked Assert.assertTrue("keyrings differ", !KeyringTestingHelper.diffKeyrings( expectedKeyRing.getEncoded(), expectedKeyRing.getEncoded(), onlyA, onlyB)); diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java index 3c29d361a..b0d458102 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/pgp/PgpKeyOperation.java @@ -692,6 +692,7 @@ public class PgpKeyOperation { private static int readMasterKeyFlags(PGPPublicKey masterKey) { int flags = KeyFlags.CERTIFY_OTHER; + //noinspection unchecked for(PGPSignature sig : new IterableIterator<PGPSignature>(masterKey.getSignatures())) { if (!sig.hasSubpackets()) { continue; diff --git a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java index 3b62656ef..1cf2a60ec 100644 --- a/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java +++ b/OpenKeychain/src/main/java/org/sufficientlysecure/keychain/service/OperationResultParcel.java @@ -12,7 +12,6 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Iterator; import java.util.List; -import java.util.Arrays; /** Represent the result of an operation. * @@ -72,9 +71,6 @@ public class OperationResultParcel implements Parcelable { mParameters = parameters; mIndent = indent; } - public LogEntryParcel(LogLevel level, LogType type, Object... parameters) { - this(level, type, 0, parameters); - } public LogEntryParcel(Parcel source) { mLevel = LogLevel.values()[source.readInt()]; diff --git a/OpenKeychain/src/main/res/values/strings.xml b/OpenKeychain/src/main/res/values/strings.xml index d6eb6a2fb..03e72d6d9 100644 --- a/OpenKeychain/src/main/res/values/strings.xml +++ b/OpenKeychain/src/main/res/values/strings.xml @@ -505,7 +505,7 @@ <string name="cert_casual">casual</string> <string name="cert_positive">positive</string> <string name="cert_revoke">revoked</string> - <string name="cert_verify_ok">ok</string> + <string name="cert_verify_ok">OK</string> <string name="cert_verify_failed">failed!</string> <string name="cert_verify_error">error!</string> <string name="cert_verify_unavailable">key unavailable</string> |