in src/main/java/org/apache/sling/commons/compiler/source/JavaEscapeHelper.java [151:159]
public static char unescape(@NotNull String escapeSequence) {
Matcher matcher = ESCAPED_CHAR_PATTERN.matcher(escapeSequence);
if (matcher.matches() && matcher.groupCount() == 1) {
String toProcess = escapeSequence.replace("__", "");
return (char) Integer.parseInt(toProcess, 16);
}
throw new IllegalArgumentException(
String.format("String '%s' does not match pattern %s.", escapeSequence, ESCAPED_CHAR_PATTERN.pattern()));
}