Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,11 @@ private static byte[] buildDecodingArray() {

private static boolean[] buildValidHexArray() {
boolean[] validHex = new boolean[Character.MAX_VALUE];
for (int i = 0; i < Character.MAX_VALUE; i++) {
validHex[i] = (48 <= i && i <= 57) || (97 <= i && i <= 102);
// Use the fact that the default initial boolean value is false
// and only explicitly init the values between the extreme HEX values
// This minimized impact during process startup esp. on mobile.
for (int i = 48; i < 103; i++) {
validHex[i] = i <= 57 || 97 <= i;
}
return validHex;
}
Expand Down
Loading