We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 18f8a13 commit 88fb317Copy full SHA for 88fb317
api/all/src/main/java/io/opentelemetry/api/internal/OtelEncodingUtils.java
@@ -44,8 +44,11 @@ private static byte[] buildDecodingArray() {
44
45
private static boolean[] buildValidHexArray() {
46
boolean[] validHex = new boolean[Character.MAX_VALUE];
47
- for (int i = 0; i < Character.MAX_VALUE; i++) {
48
- 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
49
+ // This minimized impact during process startup esp. on mobile.
50
+ for (int i = 48; i < 103; i++) {
51
+ validHex[i] = i <= 57 || 97 <= i;
52
}
53
return validHex;
54
0 commit comments