Skip to content

Commit 4eccd22

Browse files
committed
Fix hexadecimal chars
1 parent 5d9a230 commit 4eccd22

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/test/java/io/opentelemetry/contrib/generator/telemetry/jel/CustomExpressions.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ public class CustomExpressions {
1313
private static final ConcurrentMap<String, Integer> counterMaps = new ConcurrentHashMap<>();
1414
private static final ConcurrentMap<String, Boolean> boolMaps = new ConcurrentHashMap<>();
1515
private static final List<Character> hexChars = Arrays.asList('0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
16-
'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u',
17-
'v', 'w', 'x', 'y', 'z');
16+
'a', 'b', 'c', 'd', 'e', 'f');
1817

1918
public static int geometricWith2(String stateKey) {
2019
if (!counterMaps.containsKey(stateKey)) {
@@ -71,7 +70,7 @@ public static String randomUUID() {
7170
public static String randomHexadecimal(int length) {
7271
StringBuilder hexBuilder = new StringBuilder();
7372
for (int i=0; i<length; i++) {
74-
hexBuilder.append(hexChars.get(RandomUtils.nextInt(0, 36)));
73+
hexBuilder.append(hexChars.get(RandomUtils.nextInt(0, 16)));
7574
}
7675
return hexBuilder.toString();
7776
}

0 commit comments

Comments
 (0)