diff --git a/api/all/src/main/java/io/opentelemetry/api/internal/OtelEncodingUtils.java b/api/all/src/main/java/io/opentelemetry/api/internal/OtelEncodingUtils.java index 19fa277b377..2b062a12bd3 100644 --- a/api/all/src/main/java/io/opentelemetry/api/internal/OtelEncodingUtils.java +++ b/api/all/src/main/java/io/opentelemetry/api/internal/OtelEncodingUtils.java @@ -43,7 +43,7 @@ private static byte[] buildDecodingArray() { } private static boolean[] buildValidHexArray() { - boolean[] validHex = new boolean[Character.MAX_VALUE]; + boolean[] validHex = new boolean[Character.MAX_VALUE + 1]; // 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.