Skip to content

Commit 90b9460

Browse files
committed
Suppress Error Prone DuplicateBranches on the three methods whose identical branches are deliberate - the DSTU4145 and des-EDE3 TODO placeholders and the raVerified ProofOfPossession default - keeping the check on to catch genuine copy-paste branches elsewhere.
1 parent bda2d18 commit 90b9460

3 files changed

Lines changed: 6 additions & 0 deletions

File tree

‎pkix/src/main/java/org/bouncycastle/cert/crmf/CertificateRequestMessageBuilder.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,8 @@ public CertificateRequestMessageBuilder setAuthInfoSender(GeneralName sender)
256256
return this;
257257
}
258258

259+
// The explicit popRaVerified branch and the default fall-through both yield a raVerified ProofOfPossession.
260+
@SuppressWarnings("DuplicateBranches")
259261
public CertificateRequestMessage build()
260262
throws CRMFException
261263
{

‎pkix/src/main/java/org/bouncycastle/operator/bc/BcAsymmetricKeyUnwrapper.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ public BcAsymmetricKeyUnwrapper(AlgorithmIdentifier encAlgId, AsymmetricKeyParam
2222
this.privateKey = privateKey;
2323
}
2424

25+
// The des-EDE3 branch is a deliberate placeholder for the parity-bit check noted in its TODO.
26+
@SuppressWarnings("DuplicateBranches")
2527
public GenericKey generateUnwrappedKey(AlgorithmIdentifier encryptedKeyAlgorithm, byte[] encryptedKey)
2628
throws OperatorException
2729
{

‎prov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/dstu/SignatureSpi.java‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ byte[] expandSbox(byte[] compressed)
6666
return expanded;
6767
}
6868

69+
// The BCDSTU4145PrivateKey branch is a deliberate placeholder for the parameter support noted in its TODO.
70+
@SuppressWarnings("DuplicateBranches")
6971
protected void engineInitSign(
7072
PrivateKey privateKey)
7173
throws InvalidKeyException

0 commit comments

Comments
 (0)