1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-23 04:42:06 +01:00

break for-loop of addUserId method when finding key

This commit is contained in:
Paul Schaub 2020-11-13 15:11:33 +01:00
parent 86c3487ad4
commit 31844c5212
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -91,7 +91,7 @@ public class KeyRingEditor implements KeyRingEditorInterface {
Iterator<PGPSecretKey> secretKeyIterator = secretKeyRing.getSecretKeys(); Iterator<PGPSecretKey> secretKeyIterator = secretKeyRing.getSecretKeys();
boolean found = false; boolean found = false;
while (secretKeyIterator.hasNext()) { while (!found && secretKeyIterator.hasNext()) {
PGPSecretKey secretKey = secretKeyIterator.next(); PGPSecretKey secretKey = secretKeyIterator.next();
if (secretKey.getKeyID() == keyId) { if (secretKey.getKeyID() == keyId) {
found = true; found = true;