Skip to content

Commit e119f12

Browse files
committed
Normalize local variable naming
1 parent d75af8c commit e119f12

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

src/main/java/org/apache/commons/codec/digest/Sha2Crypt.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,13 @@ private static String sha2Crypt(final byte[] keyBytes, final String salt, final
329329
/*
330330
* Create byte sequence P.
331331
*/
332-
final byte[] pBytes = new byte[keyLen];
332+
final byte[] bytes = new byte[keyLen];
333333
int cp = 0;
334334
while (cp < keyLen - blocksize) {
335-
System.arraycopy(tempResult, 0, pBytes, cp, blocksize);
335+
System.arraycopy(tempResult, 0, bytes, cp, blocksize);
336336
cp += blocksize;
337337
}
338-
System.arraycopy(tempResult, 0, pBytes, cp, keyLen - cp);
338+
System.arraycopy(tempResult, 0, bytes, cp, keyLen - cp);
339339

340340
// 17. start digest DS
341341
/*
@@ -403,7 +403,7 @@ private static String sha2Crypt(final byte[] keyBytes, final String salt, final
403403
* Add key or last result.
404404
*/
405405
if ((i & 1) != 0) {
406-
ctx.update(pBytes, 0, keyLen);
406+
ctx.update(bytes, 0, keyLen);
407407
} else {
408408
ctx.update(altResult, 0, blocksize);
409409
}
@@ -421,7 +421,7 @@ private static String sha2Crypt(final byte[] keyBytes, final String salt, final
421421
* Add key for numbers not divisible by 7.
422422
*/
423423
if (i % 7 != 0) {
424-
ctx.update(pBytes, 0, keyLen);
424+
ctx.update(bytes, 0, keyLen);
425425
}
426426

427427
// f) for odd round numbers add digest A/C
@@ -432,7 +432,7 @@ private static String sha2Crypt(final byte[] keyBytes, final String salt, final
432432
if ((i & 1) != 0) {
433433
ctx.update(altResult, 0, blocksize);
434434
} else {
435-
ctx.update(pBytes, 0, keyLen);
435+
ctx.update(bytes, 0, keyLen);
436436
}
437437

438438
// h) finish digest C.
@@ -533,7 +533,7 @@ private static String sha2Crypt(final byte[] keyBytes, final String salt, final
533533
*/
534534
// Is there a better way to do this with the JVM?
535535
Arrays.fill(tempResult, (byte) 0);
536-
Arrays.fill(pBytes, (byte) 0);
536+
Arrays.fill(bytes, (byte) 0);
537537
Arrays.fill(sBytes, (byte) 0);
538538
ctx.reset();
539539
altCtx.reset();

src/main/java/org/apache/commons/codec/language/MatchRatingApproachEncoder.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,20 @@ String cleanName(final String name) {
9898
* Encodes an Object using the Match Rating Approach algorithm. Method is here to satisfy the requirements of the
9999
* Encoder interface Throws an EncoderException if input object is not of type {@link String}.
100100
*
101-
* @param pObject
101+
* @param object
102102
* Object to encode
103103
* @return An object (or type {@link String}) containing the Match Rating Approach code which corresponds to the
104104
* String supplied.
105105
* @throws EncoderException
106106
* if the parameter supplied is not of type {@link String}
107107
*/
108108
@Override
109-
public final Object encode(final Object pObject) throws EncoderException {
110-
if (!(pObject instanceof String)) {
109+
public final Object encode(final Object object) throws EncoderException {
110+
if (!(object instanceof String)) {
111111
throw new EncoderException(
112112
"Parameter supplied to Match Rating Approach encoder is not of type java.lang.String");
113113
}
114-
return encode((String) pObject);
114+
return encode((String) object);
115115
}
116116

117117
/**

0 commit comments

Comments
 (0)