Skip to content

Commit 2ff23dd

Browse files
committed
ErrorProne fixes.
1 parent 68d5152 commit 2ff23dd

File tree

5 files changed

+25
-23
lines changed

5 files changed

+25
-23
lines changed

core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT571K1Point.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import org.bouncycastle.math.ec.ECPoint.AbstractF2m;
88
import org.bouncycastle.math.raw.Nat576;
99

10+
@SuppressWarnings("AssignmentExpression")
1011
public class SecT571K1Point extends AbstractF2m
1112
{
1213
SecT571K1Point(ECCurve curve, ECFieldElement x, ECFieldElement y)
@@ -58,7 +59,7 @@ protected boolean getCompressionYTilde()
5859
// Y is actually Lambda (X + Y/X) here
5960
return Y.testBitZero() != X.testBitZero();
6061
}
61-
62+
6263
public ECPoint add(ECPoint b)
6364
{
6465
if (this.isInfinity())

core/src/main/java/org/bouncycastle/math/ec/custom/sec/SecT571R1Point.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import org.bouncycastle.math.raw.Nat;
99
import org.bouncycastle.math.raw.Nat576;
1010

11+
@SuppressWarnings("AssignmentExpression")
1112
public class SecT571R1Point extends AbstractF2m
1213
{
1314
SecT571R1Point(ECCurve curve, ECFieldElement x, ECFieldElement y)

pkix/src/main/java/org/bouncycastle/cert/ocsp/BasicOCSPRespBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ private static class ResponseObject
4343
ASN1GeneralizedTime nextUpdate;
4444
Extensions extensions;
4545

46-
public ResponseObject(
46+
ResponseObject(
4747
CertificateID certId,
4848
CertificateStatus certStatus,
4949
Date thisUpdate,
@@ -90,7 +90,7 @@ else if (certStatus instanceof UnknownStatus)
9090
this.extensions = extensions;
9191
}
9292

93-
public SingleResponse toResponse()
93+
SingleResponse toResponse()
9494
throws Exception
9595
{
9696
return new SingleResponse(certId.toASN1Primitive(), certStatus, thisUpdate, nextUpdate, extensions);

pkix/src/main/java/org/bouncycastle/cert/ocsp/OCSPReqBuilder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@ private static class RequestObject
3131
CertificateID certId;
3232
Extensions extensions;
3333

34-
public RequestObject(
34+
RequestObject(
3535
CertificateID certId,
3636
Extensions extensions)
3737
{
3838
this.certId = certId;
3939
this.extensions = extensions;
4040
}
4141

42-
public Request toRequest()
42+
Request toRequest()
4343
throws Exception
4444
{
4545
return new Request(certId.toASN1Primitive(), extensions);

pkix/src/main/java/org/bouncycastle/cert/selector/MSOutlookKeyIdCalculator.java

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ private static abstract class GeneralDigest
4444
/**
4545
* Standard constructor
4646
*/
47-
protected GeneralDigest()
47+
GeneralDigest()
4848
{
4949
xBuf = new byte[4];
5050
xBufOff = 0;
@@ -55,22 +55,22 @@ protected GeneralDigest()
5555
* of the Object.clone() interface as this interface is not
5656
* supported by J2ME.
5757
*/
58-
protected GeneralDigest(GeneralDigest t)
58+
GeneralDigest(GeneralDigest t)
5959
{
6060
xBuf = new byte[t.xBuf.length];
6161

6262
copyIn(t);
6363
}
6464

65-
protected void copyIn(GeneralDigest t)
65+
void copyIn(GeneralDigest t)
6666
{
6767
System.arraycopy(t.xBuf, 0, xBuf, 0, t.xBuf.length);
6868

6969
xBufOff = t.xBufOff;
7070
byteCount = t.byteCount;
7171
}
7272

73-
public void update(
73+
void update(
7474
byte in)
7575
{
7676
xBuf[xBufOff++] = in;
@@ -84,7 +84,7 @@ public void update(
8484
byteCount++;
8585
}
8686

87-
public void update(
87+
void update(
8888
byte[] in,
8989
int inOff,
9090
int len)
@@ -124,7 +124,7 @@ public void update(
124124
}
125125
}
126126

127-
public void finish()
127+
void finish()
128128
{
129129
long bitLength = (byteCount << 3);
130130

@@ -143,7 +143,7 @@ public void finish()
143143
processBlock();
144144
}
145145

146-
public void reset()
146+
void reset()
147147
{
148148
byteCount = 0;
149149

@@ -154,11 +154,11 @@ public void reset()
154154
}
155155
}
156156

157-
protected abstract void processWord(byte[] in, int inOff);
157+
abstract void processWord(byte[] in, int inOff);
158158

159-
protected abstract void processLength(long bitLength);
159+
abstract void processLength(long bitLength);
160160

161-
protected abstract void processBlock();
161+
abstract void processBlock();
162162
}
163163

164164
private static class SHA1Digest
@@ -174,22 +174,22 @@ private static class SHA1Digest
174174
/**
175175
* Standard constructor
176176
*/
177-
public SHA1Digest()
177+
SHA1Digest()
178178
{
179179
reset();
180180
}
181181

182-
public String getAlgorithmName()
182+
String getAlgorithmName()
183183
{
184184
return "SHA-1";
185185
}
186186

187-
public int getDigestSize()
187+
int getDigestSize()
188188
{
189189
return DIGEST_LENGTH;
190190
}
191191

192-
protected void processWord(
192+
void processWord(
193193
byte[] in,
194194
int inOff)
195195
{
@@ -207,7 +207,7 @@ protected void processWord(
207207
}
208208
}
209209

210-
protected void processLength(
210+
void processLength(
211211
long bitLength)
212212
{
213213
if (xOff > 14)
@@ -219,7 +219,7 @@ protected void processLength(
219219
X[15] = (int)(bitLength & 0xffffffff);
220220
}
221221

222-
public int doFinal(
222+
int doFinal(
223223
byte[] out,
224224
int outOff)
225225
{
@@ -239,7 +239,7 @@ public int doFinal(
239239
/**
240240
* reset the chaining variables
241241
*/
242-
public void reset()
242+
void reset()
243243
{
244244
super.reset();
245245

@@ -288,7 +288,7 @@ private int g(
288288
return ((u & v) | (u & w) | (v & w));
289289
}
290290

291-
protected void processBlock()
291+
void processBlock()
292292
{
293293
//
294294
// expand 16 word block into 80 word block.

0 commit comments

Comments
 (0)