mirror of
https://github.com/pgpainless/pgpainless.git
synced 2025-09-13 04:09:38 +02:00
Small code style fixes and optimizations
This commit is contained in:
parent
845779d40b
commit
9b9064beae
8 changed files with 13 additions and 21 deletions
|
@ -40,10 +40,6 @@ public class PGPPublicKeyRingTest {
|
|||
* It does not.
|
||||
*
|
||||
* see also https://security.stackexchange.com/questions/92635/is-it-possible-to-assign-different-uids-to-subkeys-for-the-purpose-of-having-mul
|
||||
*
|
||||
* @throws InvalidAlgorithmParameterException
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws PGPException
|
||||
*/
|
||||
@Test
|
||||
public void subkeysDoNotHaveUserIDsTest() throws InvalidAlgorithmParameterException, NoSuchAlgorithmException, PGPException {
|
||||
|
@ -54,10 +50,8 @@ public class PGPPublicKeyRingTest {
|
|||
Iterator<String> userIds = subkey.getUserIDs();
|
||||
if (primaryKey == subkey) {
|
||||
assertEquals("primary@user.id", userIds.next());
|
||||
assertFalse(userIds.hasNext());
|
||||
} else {
|
||||
assertFalse(userIds.hasNext());
|
||||
}
|
||||
assertFalse(userIds.hasNext());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -126,9 +126,9 @@ public class ModificationDetectionTests {
|
|||
|
||||
/**
|
||||
* Messages containing a missing MDC shall fail to decrypt.
|
||||
* @param implementationFactory
|
||||
* @throws IOException
|
||||
* @throws PGPException
|
||||
* @param implementationFactory implementation factory
|
||||
* @throws IOException in case of an io-error
|
||||
* @throws PGPException in case of a pgp error
|
||||
*/
|
||||
@ParameterizedTest
|
||||
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
|
||||
|
|
|
@ -39,8 +39,6 @@ public class RecursionDepthTest {
|
|||
* Test that decryption is aborted when maximum recursion depth of nested packets is exceeded.
|
||||
*
|
||||
* @see <a href="https://tests.sequoia-pgp.org/#Maximum_recursion_depth">Sequoia-PGP Test Suite</a>
|
||||
* @throws IOException
|
||||
* @throws PGPException
|
||||
*/
|
||||
@ParameterizedTest
|
||||
@MethodSource("org.pgpainless.util.TestUtil#provideImplementationFactories")
|
||||
|
|
|
@ -38,6 +38,7 @@ public class ProviderFactoryTest {
|
|||
|
||||
private ProviderFactory customProviderFactory = new ProviderFactory() {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
Provider provider = new Provider("PL", 1L, "PGPainlessTestProvider") {
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue