Skip to content

Commit cb97093

Browse files
committed
Make the SLHDSA private-key seed holders and the enveloped-data stream generators' output streams static nested classes, since none reference their enclosing instance, clearing the Error Prone ClassCanBeStatic warnings.
1 parent f6b6c2f commit cb97093

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎core/src/main/java/org/bouncycastle/crypto/params/SLHDSAPrivateKeyParameters.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ private byte[] cloneWithCheck(byte[] fieldValue)
105105
return rv;
106106
}
107107

108-
private class PK
108+
private static class PK
109109
{
110110
final byte[] seed;
111111
final byte[] root;
@@ -117,7 +117,7 @@ private class PK
117117
}
118118
}
119119

120-
private class SK
120+
private static class SK
121121
{
122122
final byte[] seed;
123123
final byte[] prf;

‎pkix/src/main/java/org/bouncycastle/cms/CMSAuthEnvelopedDataStreamGenerator.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ private OutputStream openDL(
303303
encryptor, inputLength, enc, octGen, eciGen, aedGen, cGen, authAttrsEnc, unauthAttrsEnc);
304304
}
305305

306-
private class CMSAuthEnvelopedDLDataOutputStream
306+
private static class CMSAuthEnvelopedDLDataOutputStream
307307
extends OutputStream
308308
{
309309
private final OutputAEADEncryptor _encryptor;

‎pkix/src/main/java/org/bouncycastle/cms/CMSEnvelopedDataStreamGenerator.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ private OutputStream openDL(
297297
return new CmsEnvelopedDLDataOutputStream(encryptor, inputLength, octGen, eciGen, envGen, cGen, unprotEnc);
298298
}
299299

300-
private class CmsEnvelopedDLDataOutputStream
300+
private static class CmsEnvelopedDLDataOutputStream
301301
extends OutputStream
302302
{
303303
private final OutputEncryptor _encryptor;

0 commit comments

Comments
 (0)