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(); ArrayList onlyB = new ArrayList(); + //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(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 @@ casual positive revoked - ok + OK failed! error! key unavailable