New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import keys when same key available twice on keyserver (#1707) #1798
Conversation
KeyFormattingUtils.convertFingerprintToHex(publicKey.getFingerprint()) | ||
.equalsIgnoreCase(expectedFingerprint) | ||
|| TextUtils.equals(Long.toString(publicKey.getKeyId()), expectedKeyId)); | ||
if (publicKeyMatches) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can reduce nesting depth in cases like this with something like if (!publicKeyMatches) { continue; }
, which also makes it obvious that there is no else case
…yserver Allow for import of keys when the same key is available twice on the keyserver.
6355a29
to
f6c6369
Compare
f6c6369
to
2e21e70
Compare
@Valodim should be ready for another review! |
|
||
boolean publicKeyMatches = ( fingerprintMatches || keyIdMatches ); | ||
|
||
if ( ! publicKeyMatches) { continue; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
code style
@Valodim Code style issues + comments should be fixed now |
Would you add a positive and a negative unit test for the behavior you introduced? That would be awesome 👍 |
@roryflynn Still working on this PR? |
@dschuermann Apologies, not at the minute due to exams. Others are welcome to finish it off by creating the test cases though. If not, I'll try to finish it in about two weeks time. |
@roryflynn Take your time with the exams. We appreciate if you get back to us afterwards :) |
|
closing as stale |
#1707 Allow for import of keys when the same key is available twice on the keyserver.