mirror of
https://github.com/pgpainless/pgpainless.git
synced 2024-12-23 03:17:58 +01:00
Remove dependency on jetbrains annotations
This commit is contained in:
parent
4f6a7d2838
commit
f10d698a09
3 changed files with 13 additions and 10 deletions
|
@ -3,7 +3,6 @@ plugins {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.jetbrains:annotations:19.0.0'
|
||||
testImplementation group: 'junit', name: 'junit', version: '4.12'
|
||||
/*
|
||||
implementation "org.bouncycastle:bcprov-debug-jdk15on:$bouncyCastleVersion"
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DecryptionBuilder implements DecryptionBuilderInterface {
|
|||
private final KeyFingerPrintCalculator keyFingerPrintCalculator = new BcKeyFingerprintCalculator();
|
||||
|
||||
@Override
|
||||
public DecryptWith onInputStream(InputStream inputStream) {
|
||||
public DecryptWith onInputStream(@Nonnull InputStream inputStream) {
|
||||
this.inputStream = inputStream;
|
||||
return new DecryptWithImpl();
|
||||
}
|
||||
|
@ -75,7 +75,7 @@ public class DecryptionBuilder implements DecryptionBuilderInterface {
|
|||
class VerifyImpl implements Verify {
|
||||
|
||||
@Override
|
||||
public VerifyWith verifyDetachedSignature(InputStream inputStream) throws IOException, PGPException {
|
||||
public VerifyWith verifyDetachedSignature(@Nonnull InputStream inputStream) throws IOException, PGPException {
|
||||
List<PGPSignature> signatures = new ArrayList<>();
|
||||
InputStream pgpIn = PGPUtil.getDecoderStream(inputStream);
|
||||
PGPObjectFactory objectFactory = new PGPObjectFactory(
|
||||
|
@ -104,23 +104,24 @@ public class DecryptionBuilder implements DecryptionBuilderInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public VerifyWith verifyDetachedSignatures(List<PGPSignature> signatures) {
|
||||
public VerifyWith verifyDetachedSignatures(@Nonnull List<PGPSignature> signatures) {
|
||||
DecryptionBuilder.this.detachedSignatures = signatures;
|
||||
return new VerifyWithImpl();
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandleMissingPublicKeys verifyWith(@org.jetbrains.annotations.NotNull PGPPublicKeyRingCollection publicKeyRings) {
|
||||
public HandleMissingPublicKeys verifyWith(@Nonnull PGPPublicKeyRingCollection publicKeyRings) {
|
||||
return new VerifyWithImpl().verifyWith(publicKeyRings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandleMissingPublicKeys verifyWith(@org.jetbrains.annotations.NotNull Set<OpenPgpV4Fingerprint> trustedFingerprints, @org.jetbrains.annotations.NotNull PGPPublicKeyRingCollection publicKeyRings) {
|
||||
public HandleMissingPublicKeys verifyWith(@Nonnull Set<OpenPgpV4Fingerprint> trustedFingerprints,
|
||||
@Nonnull PGPPublicKeyRingCollection publicKeyRings) {
|
||||
return new VerifyWithImpl().verifyWith(trustedFingerprints, publicKeyRings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public HandleMissingPublicKeys verifyWith(@org.jetbrains.annotations.NotNull Set<PGPPublicKeyRing> publicKeyRings) {
|
||||
public HandleMissingPublicKeys verifyWith(@Nonnull Set<PGPPublicKeyRing> publicKeyRings) {
|
||||
return new VerifyWithImpl().verifyWith(publicKeyRings);
|
||||
}
|
||||
|
||||
|
|
|
@ -256,17 +256,20 @@ public class EncryptionBuilder implements EncryptionBuilderInterface {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Armor signWith(@org.jetbrains.annotations.NotNull SecretKeyRingProtector decryptor, @org.jetbrains.annotations.NotNull PGPSecretKey... keys) {
|
||||
public Armor signWith(@Nonnull SecretKeyRingProtector decryptor, @Nonnull PGPSecretKey... keys) {
|
||||
return new SignWithImpl().signWith(decryptor, keys);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Armor signWith(@org.jetbrains.annotations.NotNull SecretKeyRingProtector decryptor, @org.jetbrains.annotations.NotNull PGPSecretKeyRing... keyRings) {
|
||||
public Armor signWith(@Nonnull SecretKeyRingProtector decryptor, @Nonnull PGPSecretKeyRing... keyRings) {
|
||||
return new SignWithImpl().signWith(decryptor, keyRings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <O> Armor signWith(@org.jetbrains.annotations.NotNull SecretKeyRingSelectionStrategy<O> selectionStrategy, @org.jetbrains.annotations.NotNull SecretKeyRingProtector decryptor, @org.jetbrains.annotations.NotNull MultiMap<O, PGPSecretKeyRingCollection> keys) throws SecretKeyNotFoundException {
|
||||
public <O> Armor signWith(@Nonnull SecretKeyRingSelectionStrategy<O> selectionStrategy,
|
||||
@Nonnull SecretKeyRingProtector decryptor,
|
||||
@Nonnull MultiMap<O, PGPSecretKeyRingCollection> keys)
|
||||
throws SecretKeyNotFoundException {
|
||||
return new SignWithImpl().signWith(selectionStrategy, decryptor, keys);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue