Skip to content

Commit 94c3b11

Browse files
committed
Enforce checkstyle EmptyLineSeparator rule
This update changes whitespace associated with empty lines for enhanced readability. Signed-off-by: Jason Katonica <[email protected]>
1 parent c4f2607 commit 94c3b11

File tree

172 files changed

+179
-633
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

172 files changed

+179
-633
lines changed

checkstyle.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@
2121
<property name="fileExtensions" value="java"/>
2222
<module name="AvoidStarImport"/>
2323
<module name="EmptyBlock"/>
24+
<module name="EmptyLineSeparator">
25+
<property name="allowMultipleEmptyLinesInsideClassMembers" value="false"/>
26+
<property name="allowNoEmptyLineBetweenFields" value="true"/>
27+
</module>
2428
<module name="GenericWhitespace"/>
2529
<module name="ImportOrder"/>
2630
<module name="Indentation">

src/main/java/com/ibm/crypto/plus/provider/AESCCMCipher.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -684,7 +684,6 @@ protected void engineUpdateAAD(byte[] src, int offset, int len) {
684684
"AAD must be supplied before encryption/decryption starts");
685685
}
686686

687-
688687
if (this.authData == null) {
689688
this.authData = new byte[len];
690689
System.arraycopy(src, offset, authData, 0, len);

src/main/java/com/ibm/crypto/plus/provider/AESGCMCipher.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ protected byte[] engineDoFinal(byte[] input, int inputOffset, int inputLen)
186186
// OCKDebug.Msg(debPrefix, methodName, "OCKException encountered = " +
187187
// e.getMessage());
188188

189-
190189
if (!encrypting) {
191190
AEADBadTagException abte = new AEADBadTagException(
192191
"Unable to perform engine doFinal; "
@@ -294,7 +293,6 @@ protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[]
294293
//
295294
//requireReinit = true;
296295

297-
298296
if (!encrypting) {
299297
AEADBadTagException abte = new AEADBadTagException(e.getMessage());
300298
provider.setOCKExceptionCause(abte, e);
@@ -391,8 +389,6 @@ protected int engineDoFinal(byte[] input, int inputOffset, int inputLen, byte[]
391389
resetVars(true);
392390
throw provider.providerException("Failure in engineDoFinal", e);
393391
}
394-
395-
396392
}
397393

398394
private byte[] doFinalForUpdates(byte[] input, int inputOffset, int inputLen)
@@ -983,7 +979,6 @@ protected int doUpdate(byte[] input, int inputOffset, int inputLen, byte[] outpu
983979

984980
// Check for IV and Key.
985981

986-
987982
// OCKDebug.Msg(debPrefix, methodName, "is length greater than 0 " + len);
988983
try {
989984
// first do Init And AAED
@@ -1115,7 +1110,6 @@ protected int doUpdate(byte[] input, int inputOffset, int inputLen, byte[] outpu
11151110
// output, outputOffset);
11161111
} else {
11171112

1118-
11191113
outLen += GCMCipher.do_GCM_UpdForUpdateEncrypt(ockContext, Key.getValue(), IV,
11201114
tagLenInBytes, input, inputOffset, inputConsumed, output,
11211115
outputOffset, authData, provider);
@@ -1342,8 +1336,6 @@ private byte[] prepareInputBuffer(byte[] input, int inputOffset, int inputLen, b
13421336
int len = Math.addExact(buffered, inputLen);
13431337
//OCKDebug.Msg(debPrefix, methodName,"buffered=" + buffered + "inputLen=" + inputLen + "len=" + len);
13441338

1345-
1346-
13471339
/*
13481340
* prepare the final input, assemble a new buffer if any
13491341
* of the following is true:

src/main/java/com/ibm/crypto/plus/provider/AESKeyWrapCipher.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ private boolean checkKeySize(int keySize) {
356356
}
357357
return true;
358358
}
359+
359360
public static final class KW extends AESKeyWrapCipher {
360361

361362
public KW(OpenJCEPlusProvider provider) {

src/main/java/com/ibm/crypto/plus/provider/CurveUtil.java

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,16 @@ public enum CURVE {
2424
X25519, X448, FFDHE2048, FFDHE3072, FFDHE4096, FFDHE6144, FFDHE8192
2525
}
2626

27-
private static final Map<CURVE, Integer> curveSizes = new HashMap<CURVE, Integer>(); // key sizes of curves in bytes
28-
private static final Map<CURVE, Integer> DEREncodingSizes = new HashMap<CURVE, Integer>(); // key sizes of der encoded private key values.
29-
private static final Map<Integer, CURVE> sizesToCurves = new HashMap<Integer, CURVE>(); // maps the total key size (I think?)
30-
// to algorithm (used in constructor)
31-
static {
27+
// key sizes of curves in bytes
28+
private static final Map<CURVE, Integer> curveSizes = new HashMap<CURVE, Integer>();
29+
30+
// key sizes of der encoded private key values.
31+
private static final Map<CURVE, Integer> DEREncodingSizes = new HashMap<CURVE, Integer>();
3232

33+
// maps the total key size (I think?) to algorithm (used in constructor)
34+
private static final Map<Integer, CURVE> sizesToCurves = new HashMap<Integer, CURVE>();
35+
36+
static {
3337
curveSizes.put(CURVE.X25519, 32);
3438
curveSizes.put(CURVE.X448, 56);
3539
curveSizes.put(CURVE.FFDHE2048, 256);

src/main/java/com/ibm/crypto/plus/provider/DHKeyAgreement.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ protected byte[] engineGenerateSecret() throws IllegalStateException {
155155
throw ise;
156156
}
157157

158-
159158
// Make the computed secert compatible with IBMJCE provider
160159
BigInteger modulus = init_p;
161160
int expectedLen = (modulus.bitLength() + 7) >>> 3;
@@ -185,8 +184,6 @@ protected byte[] engineGenerateSecret() throws IllegalStateException {
185184
}
186185
return result;
187186
}
188-
189-
190187
}
191188

192189
@Override

src/main/java/com/ibm/crypto/plus/provider/DHPrivateKey.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,8 +242,6 @@ private byte[] buildOCKPrivateKeyBytes() throws IOException {
242242
} finally {
243243
closeStream(asn1Key);
244244
}
245-
246-
247245
}
248246

249247
protected void parseKeyBits() throws IOException {

src/main/java/com/ibm/crypto/plus/provider/DHPublicKey.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,6 @@ private byte[] convertOCKPublicKeyBytes(byte[] encodedKey) throws IOException {
190190
throw new IOException("Extra parameter data");
191191
}
192192

193-
194193
/*
195194
* Parse the key
196195
*/

src/main/java/com/ibm/crypto/plus/provider/DSASignature.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ public SHA256withDSA(OpenJCEPlusProvider provider) {
151151
super(provider, "SHA256"); // OCK digest name
152152
}
153153
}
154+
154155
// nested static class for the SHA3_224withDSA implementation
155156
public static final class SHA3_224withDSA extends DSASignature {
156157
public SHA3_224withDSA(OpenJCEPlusProvider provider) {
@@ -164,6 +165,7 @@ public SHA3_256withDSA(OpenJCEPlusProvider provider) {
164165
super(provider, "SHA3-256"); // OCK digest name
165166
}
166167
}
168+
167169
// nested static class for the SHA3_384withDSA implementation
168170
public static final class SHA3_384withDSA extends DSASignature {
169171
public SHA3_384withDSA(OpenJCEPlusProvider provider) {

src/main/java/com/ibm/crypto/plus/provider/ECDSASignature.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ public SHA512withECDSA(OpenJCEPlusProvider provider) {
186186
super(provider, "SHA512");
187187
}
188188
}
189+
189190
// nested static class for the SHA3_224withECDSA implementation
190191
public static final class SHA3_224withECDSA extends ECDSASignature {
191192
public SHA3_224withECDSA(OpenJCEPlusProvider provider) {

0 commit comments

Comments
 (0)