Skip to content

Commit bb10704

Browse files
authored
Expose HexFormat in Painless (#112412)
Java 17 introduced a utility for parsing and formatting bytes as hexadecimal strings. This commit exposes that class in Painless.
1 parent 513e3ea commit bb10704

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

docs/changelog/112412.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
pr: 112412
2+
summary: Expose `HexFormat` in Painless
3+
area: Infra/Scripting
4+
type: enhancement
5+
issues: []

modules/lang-painless/src/main/resources/org/elasticsearch/painless/java.util.txt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -684,6 +684,24 @@ class java.util.Hashtable {
684684
def clone()
685685
}
686686

687+
class java.util.HexFormat {
688+
HexFormat of()
689+
HexFormat ofDelimiter(String)
690+
HexFormat withDelimiter(String)
691+
HexFormat withPrefix(String)
692+
HexFormat withSuffix(String)
693+
HexFormat withUpperCase()
694+
HexFormat withLowerCase()
695+
String delimiter()
696+
String prefix()
697+
String suffix()
698+
boolean isUpperCase()
699+
String formatHex(byte[])
700+
String formatHex(byte[],int,int)
701+
byte[] parseHex(CharSequence)
702+
byte[] parseHex(CharSequence,int,int)
703+
}
704+
687705
class java.util.IdentityHashMap {
688706
()
689707
(Map)

0 commit comments

Comments
 (0)