1
0
Fork 0
mirror of https://github.com/pgpainless/pgpainless.git synced 2024-11-26 22:32:07 +01:00

Revert if-conditions to reduce indentation level

This commit is contained in:
Paul Schaub 2021-06-28 21:06:12 +02:00
parent e13a2fce73
commit 9395fa80a2
Signed by: vanitasvitae
GPG key ID: 62BEE9264BF17311

View file

@ -697,13 +697,14 @@ public class KeyRingInfo {
* @return true if all secret keys are unencrypted.
*/
public boolean isFullyDecrypted() {
if (isSecretKey()) {
if (!isSecretKey()) {
return true;
}
for (PGPSecretKey secretKey : getSecretKeys()) {
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isEncrypted(secretKey)) {
return false;
}
}
}
return true;
}
@ -716,7 +717,9 @@ public class KeyRingInfo {
* @return true if all secret keys are encrypted.
*/
public boolean isFullyEncrypted() {
if (isSecretKey()) {
if (!isSecretKey()) {
return false;
}
for (PGPSecretKey secretKey : getSecretKeys()) {
if (!KeyInfo.hasDummyS2K(secretKey) && KeyInfo.isDecrypted(secretKey)) {
return false;
@ -724,8 +727,6 @@ public class KeyRingInfo {
}
return true;
}
return false;
}
/**
* Return the version number of the public keys format.