Skip to content

Commit 3a7cdf5

Browse files
committed
Fix PMD UnusedFormalParameter in private constructor in
org.apache.commons.codec.binary.Base16
1 parent b1b7b5a commit 3a7cdf5

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/changes/changes.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ The <action> type attribute can be add,update,fix,remove.
5959
<action type="fix" dev="ggregory" issue="CODEC-331" due-to="IlikeCode, Gary Gregory">org.apache.commons.codec.language.bm.Rule.parsePhonemeExpr(String) adds duplicate empty phoneme when input ends with |.</action>
6060
<action type="fix" dev="ggregory" issue="CODEC-331" due-to="IlikeCode, Gary Gregory">org.apache.commons.codec.language.DaitchMokotoffSoundex.cleanup(String) does not remove special characters like punctuation.</action>
6161
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD multiple UnnecessaryFullyQualifiedName in org.apache.commons.codec.binary.StringUtils.</action>
62+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Fix PMD UnusedFormalParameter in private constructor in org.apache.commons.codec.binary.Base16.</action>
6263
<!-- ADD -->
6364
<action type="add" dev="ggregory" due-to="Gary Gregory">Add HmacUtils.hmac(Path).</action>
6465
<action type="add" dev="ggregory" due-to="Gary Gregory">Add HmacUtils.hmacHex(Path).</action>

src/main/java/org/apache/commons/codec/binary/Base16.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,12 +122,10 @@ public Base16(final boolean lowerCase) {
122122

123123
/**
124124
* Constructs a Base16 codec used for decoding and encoding.
125-
*
126-
* @param lowerCase if {@code true} then use a lower-case Base16 alphabet.
127125
* @param encodeTable the encode table.
128126
* @param decodingPolicy Decoding policy.
129127
*/
130-
private Base16(final boolean lowerCase, final byte[] encodeTable, final CodecPolicy decodingPolicy) {
128+
private Base16(final byte[] encodeTable, final CodecPolicy decodingPolicy) {
131129
super(BYTES_PER_UNENCODED_BLOCK, BYTES_PER_ENCODED_BLOCK, 0, 0, PAD_DEFAULT, decodingPolicy);
132130
Objects.requireNonNull(encodeTable, "encodeTable");
133131
this.encodeTable = encodeTable;
@@ -141,7 +139,7 @@ private Base16(final boolean lowerCase, final byte[] encodeTable, final CodecPol
141139
* @param decodingPolicy Decoding policy.
142140
*/
143141
public Base16(final boolean lowerCase, final CodecPolicy decodingPolicy) {
144-
this(lowerCase, lowerCase ? LOWER_CASE_ENCODE_TABLE : UPPER_CASE_ENCODE_TABLE, decodingPolicy);
142+
this(lowerCase ? LOWER_CASE_ENCODE_TABLE : UPPER_CASE_ENCODE_TABLE, decodingPolicy);
145143
}
146144

147145
@Override

0 commit comments

Comments
 (0)