RFR: JDK-8322218: Better escaping of single and double quotes in annotation toString() results

Mandy Chung mchung at openjdk.org
Tue Feb 6 22:51:53 UTC 2024


On Thu, 1 Feb 2024 01:32:42 GMT, Joe Darcy <darcy at openjdk.org> wrote:

> A double quote character doesn't need to be escaped when it is a char literal and single quote character doesn't need to be escaped when it is in a string. This change updates the toString() output of annotations to account for the different escaping requirements of strings and characters.
> 
> Corresponding issue filed for javac's compile-time annotations: JDK-8325078.

This looks good to me.

-------------

Marked as reviewed by mchung (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/17664#pullrequestreview-1866468044


More information about the core-libs-dev mailing list