We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Describe the bug
According to the language definition,
string(bytes) -> string converts a byte sequence to a UTF-8 string, errors for invalid code points.
string(bytes) -> string
However, cel-java does not error for invalid code points.
To Reproduce
string(b"\xff")
Expected behavior
I would expect a runtime error, but the expression evaluates to "�" instead.
"�"
Additional context
bytes_to_string calls ByteString::toStringUtf8. It should probably check ByteString::isValidUtf8 first, and raise an error if that returns false.
bytes_to_string
ByteString::toStringUtf8
ByteString::isValidUtf8
Describe the bug
According to the language definition,
However, cel-java does not error for invalid code points.
To Reproduce
Expected behavior
I would expect a runtime error, but the expression evaluates to
"�"instead.Additional context
bytes_to_stringcallsByteString::toStringUtf8. It should probably checkByteString::isValidUtf8first, and raise an error if that returns false.