Skip to content

Commit 1dfb4e5

Browse files
committed
Better internal method name
1 parent fe23bcf commit 1dfb4e5

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/main/java/org/apache/commons/codec/net/PercentCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ private byte[] doEncode(final byte[] bytes, final int expectedLength, final bool
150150
if (bb < 0) {
151151
bb = (byte) (256 + bb);
152152
}
153-
final char hex1 = Utils.hexDigit(bb >> 4);
154-
final char hex2 = Utils.hexDigit(bb);
153+
final char hex1 = Utils.hexChar(bb >> 4);
154+
final char hex2 = Utils.hexChar(bb);
155155
buffer.put(ESCAPE_CHAR);
156156
buffer.put((byte) hex1);
157157
buffer.put((byte) hex2);

src/main/java/org/apache/commons/codec/net/QuotedPrintableCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,8 @@ public static final byte[] encodeQuotedPrintable(BitSet printable, final byte[]
283283
*/
284284
private static int encodeQuotedPrintable(final int b, final ByteArrayOutputStream buffer) {
285285
buffer.write(ESCAPE_CHAR);
286-
final char hex1 = Utils.hexDigit(b >> 4);
287-
final char hex2 = Utils.hexDigit(b);
286+
final char hex1 = Utils.hexChar(b >> 4);
287+
final char hex2 = Utils.hexChar(b);
288288
buffer.write(hex1);
289289
buffer.write(hex2);
290290
return 3;

src/main/java/org/apache/commons/codec/net/URLCodec.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,8 @@ public static final byte[] encodeUrl(BitSet urlsafe, final byte[] bytes) {
153153
buffer.write(b);
154154
} else {
155155
buffer.write(ESCAPE_CHAR);
156-
final char hex1 = Utils.hexDigit(b >> 4);
157-
final char hex2 = Utils.hexDigit(b);
156+
final char hex1 = Utils.hexChar(b >> 4);
157+
final char hex2 = Utils.hexChar(b);
158158
buffer.write(hex1);
159159
buffer.write(hex2);
160160
}

src/main/java/org/apache/commons/codec/net/Utils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ static int digit16(final byte b) throws DecoderException {
5656
* @param b the input int
5757
* @return the upper case hexadecimal digit of the lower 4 bits of the int.
5858
*/
59-
static char hexDigit(final int b) {
59+
static char hexChar(final int b) {
6060
return Character.toUpperCase(Character.forDigit(b & 0xF, RADIX));
6161
}
6262

0 commit comments

Comments
 (0)