-
Notifications
You must be signed in to change notification settings - Fork 37.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve toString() for synthesized annotations
Although the initial report in gh-28015 only covered inconsistencies for arrays and strings in the toString() implementations for annotations between the JDK (after Java 9) and Spring, it has since come to our attention that there was further room for improvement. This commit therefore addresses the following in toString() output for synthesized annotations. - characters are now wrapped in single quotes. - bytes are now properly formatted as "(byte) 0x##". - long, float, and double values are now appended with "L", "f", and "d", respectively. The use of lowercase for "f" and "d" is solely to align with the choice made by the JDK team. However, this commit does not address the following issues which we may choose to address at a later point in time. - non-ASCII, non-visible, and non-printable characters within a character or String literal are not escaped. - formatting for float and double values does not take into account whether a value is not a number (NaN) or infinite. Closes gh-28015
- Loading branch information
Showing
2 changed files
with
74 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters