Skip to content

Commit 48695b9

Browse files
committed
Further build noise reduction. Relates to github #2026
1 parent 05c8866 commit 48695b9

File tree

36 files changed

+70
-64
lines changed

36 files changed

+70
-64
lines changed

core/src/main/java/org/bouncycastle/asn1/gm/GMObjectIdentifiers.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public interface GMObjectIdentifiers
5050

5151
/**
5252
* <Information security technology — Cryptographic application identifier criterion specification>
53-
* <url>http://c.gb688.cn/bzgk/gb/showGb?type=online&hcno=252CF0F72A7BE339A56DEA7D774E8994</url>,
53+
* <url>http://c.gb688.cn/bzgk/gb/showGb?type=online&hcno=252CF0F72A7BE339A56DEA7D774E8994</url>,
5454
* Page 21 only cover from 301.1 to 301.3
5555
* */
5656
ASN1ObjectIdentifier wapip192v1 = sm_scheme.branch("301.101");

core/src/main/java/org/bouncycastle/math/ec/ECCurve.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -692,6 +692,7 @@ public static class Fp extends AbstractFp
692692
* @deprecated use constructor taking order/cofactor
693693
*/
694694
@Deprecated
695+
@SuppressWarnings("InlineMeSuggester")
695696
public Fp(BigInteger q, BigInteger a, BigInteger b)
696697
{
697698
this(q, a, b, null, null);
@@ -1155,6 +1156,7 @@ public static class F2m extends AbstractF2m
11551156
* @deprecated use constructor taking order/cofactor
11561157
*/
11571158
@Deprecated
1159+
@SuppressWarnings("InlineMeSuggester")
11581160
public F2m(
11591161
int m,
11601162
int k,
@@ -1214,6 +1216,7 @@ public F2m(
12141216
* @deprecated use constructor taking order/cofactor
12151217
*/
12161218
@Deprecated
1219+
@SuppressWarnings("InlineMeSuggester")
12171220
public F2m(
12181221
int m,
12191222
int k1,

core/src/main/java/org/bouncycastle/pqc/crypto/crystals/dilithium/DilithiumPrivateKeyParameters.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ public byte[] getK()
6464

6565
/** @deprecated Use {@link #getEncoded()} instead. */
6666
@Deprecated
67+
@SuppressWarnings("InlineMeSuggester")
6768
public byte[] getPrivateKey()
6869
{
6970
return getEncoded();

core/src/main/java/org/bouncycastle/pqc/crypto/mldsa/MLDSAPrivateKeyParameters.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public byte[] getK()
157157
* @deprecated Use {@link #getEncoded()} instead.
158158
*/
159159
@Deprecated
160+
@SuppressWarnings("InlineMeSuggester")
160161
public byte[] getPrivateKey()
161162
{
162163
return getEncoded();

core/src/main/java/org/bouncycastle/pqc/crypto/sphincsplus/SPHINCSPlusParameters.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,7 @@ public static SPHINCSPlusParameters getParams(Integer id)
194194
* @deprecated Use {@link #getID()} instead
195195
*/
196196
@Deprecated
197+
@SuppressWarnings("InlineMeSuggester")
197198
public static Integer getID(SPHINCSPlusParameters params)
198199
{
199200
return params.getID();

mail/src/main/java/org/bouncycastle/mail/smime/validator/SignedMailValidator.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import java.util.Iterator;
2525
import java.util.LinkedHashSet;
2626
import java.util.List;
27+
import java.util.Locale;
2728
import java.util.Map;
2829
import java.util.Set;
2930

@@ -83,6 +84,8 @@ public class SignedMailValidator
8384
private static final int KU_DIGITAL_SIGNATURE = 0;
8485
private static final int KU_NON_REPUDIATION = 1;
8586

87+
private static final Locale locale = Locale.getDefault();
88+
8689
private CertStore certs;
8790

8891
private SignerInformationStore signers;
@@ -106,7 +109,7 @@ public class SignedMailValidator
106109
*
107110
* @param message the signed {@link MimeMessage}.
108111
* @param param the parameters for the certificate path validation.
109-
* @throws {@link SignedMailValidatorException} if the message is not a signed message or if an
112+
* @throws SignedMailValidatorException if the message is not a signed message or if an
110113
* exception occurs reading the message.
111114
*/
112115
public SignedMailValidator(MimeMessage message, PKIXParameters param) throws SignedMailValidatorException
@@ -132,7 +135,7 @@ public SignedMailValidator(MimeMessage message, PKIXParameters param) throws Sig
132135
* constructor.
133136
* @throws SignedMailValidatorException if the message is not a signed message or if an exception
134137
* occurs reading the message.
135-
* @throws {@link IllegalArgumentException} if the certPathReviewerClass is not a subclass of
138+
* @throws IllegalArgumentException if the certPathReviewerClass is not a subclass of
136139
* {@link PKIXCertPathReviewer} or objects of certPathReviewerClass can not be instantiated.
137140
*/
138141
public SignedMailValidator(MimeMessage message, PKIXParameters param, Class certPathReviewerClass)
@@ -377,7 +380,7 @@ public static Set getEmailAddresses(X509Certificate cert) throws IOException, Ce
377380
{
378381
if (PKCSObjectIdentifiers.pkcs_9_at_emailAddress.equals(atVs[j].getType()))
379382
{
380-
String email = ((ASN1String)atVs[j].getValue()).getString().toLowerCase();
383+
String email = ((ASN1String)atVs[j].getValue()).getString().toLowerCase(locale);
381384
addresses.add(email);
382385
}
383386
}
@@ -394,7 +397,7 @@ public static Set getEmailAddresses(X509Certificate cert) throws IOException, Ce
394397
GeneralName name = names[i];
395398
if (name.getTagNo() == GeneralName.rfc822Name)
396399
{
397-
String email = ASN1IA5String.getInstance(name.getName()).getString().toLowerCase();
400+
String email = ASN1IA5String.getInstance(name.getName()).getString().toLowerCase(locale);
398401
addresses.add(email);
399402
}
400403
}
@@ -496,7 +499,7 @@ static boolean hasAnyFromAddress(Set certEmails, String[] fromAddresses)
496499
// check if email in cert is equal to the from address in the message
497500
for (int i = 0; i < fromAddresses.length; ++i)
498501
{
499-
if (certEmails.contains(fromAddresses[i].toLowerCase()))
502+
if (certEmails.contains(fromAddresses[i].toLowerCase(locale)))
500503
{
501504
return true;
502505
}

mls/src/main/java/org/bouncycastle/mls/TreeKEM/TreeKEMPublicKey.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,7 @@ public LeafNode getLeafNode(LeafIndex index)
391391
return node.getLeafNode();
392392
}
393393

394+
@SuppressWarnings("NonApiType")
394395
public ArrayList<NodeIndex> resolve(NodeIndex index)
395396
{
396397
boolean atLeaf = (index.level() == 0);

mls/src/main/java/org/bouncycastle/mls/codec/GroupContext.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import java.io.IOException;
44
import java.util.ArrayList;
5+
import java.util.List;
56

67
import org.bouncycastle.mls.crypto.MlsCipherSuite;
78

@@ -28,12 +29,12 @@ public byte[] getConfirmedTranscriptHash()
2829
return confirmedTranscriptHash;
2930
}
3031

31-
public ArrayList<Extension> getExtensions()
32+
public List<Extension> getExtensions()
3233
{
3334
return extensions;
3435
}
3536

36-
public GroupContext(MlsCipherSuite ciphersuite, byte[] groupID, long epoch, byte[] treeHash, byte[] confirmedTranscriptHash, ArrayList<Extension> extensions)
37+
public GroupContext(MlsCipherSuite ciphersuite, byte[] groupID, long epoch, byte[] treeHash, byte[] confirmedTranscriptHash, List<Extension> extensions)
3738
{
3839
this.suite = ciphersuite;
3940
this.ciphersuite = ciphersuite.getSuiteID();

mls/src/main/java/org/bouncycastle/mls/protocol/Group.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
public class Group
5757
{
5858

59-
public class GroupWithMessage
59+
public static class GroupWithMessage
6060
{
6161
public Group group;
6262
public MLSMessage message;
@@ -393,7 +393,7 @@ public MlsCipherSuite getSuite()
393393
return suite;
394394
}
395395

396-
public ArrayList<Extension> getExtensions()
396+
public List<Extension> getExtensions()
397397
{
398398
return extensions;
399399
}

pg/src/main/java/org/bouncycastle/bcpg/PublicKeyPacket.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ private void parseKey(BCPGInputStream in, int algorithmId, long optLen)
221221
* @deprecated use versioned {@link #PublicKeyPacket(int, int, Date, BCPGKey)} instead
222222
*/
223223
@Deprecated
224+
@SuppressWarnings("InlineMeSuggester")
224225
public PublicKeyPacket(
225226
int algorithm,
226227
Date time,

0 commit comments

Comments
 (0)