Skip to content

Commit fe51151

Browse files
committed
Java: Describe CharacterLiteral.getValue() behavior for surrogates
1 parent 4f59886 commit fe51151

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

java/ql/lib/semmle/code/java/Expr.qll

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,9 @@ class CharacterLiteral extends Literal, @characterliteral {
720720
/**
721721
* Gets a string which consists of the single character represented by
722722
* this literal.
723+
*
724+
* Unicode surrogate characters (U+D800 to U+DFFF) have the replacement character
725+
* U+FFFD as result instead.
723726
*/
724727
override string getValue() { result = super.getValue() }
725728

0 commit comments

Comments
 (0)