RFR: 8344841: ClassPrinter prints confusing value for null [v2]

Adam Sotona asotona at openjdk.org
Mon Nov 25 07:35:58 UTC 2024


> ClassPrinter prints `null` values as `String` "null" or as `String.valueOf(ConstantDescs.BSM_NULL_CONSTANT)`, based on context.
> 
> This patch unifies handling of `null` values.
> They are now exclusively represented as `ConstantDescs.BSM_NULL_CONSTANT`.
> In Json and Yaml format is `null` value printed unquoted and in Xml as `<null/>`.
> In Json and Yaml is `"null"` `String` printed quoted to distinguish from the `null` value.
> 
> Please review.
> 
> Thank you,
> Adam

Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:

  Simplified mapping

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/22316/files
  - new: https://git.openjdk.org/jdk/pull/22316/files/6db7e46e..17749f83

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=22316&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=22316&range=00-01

  Stats: 6 lines in 1 file changed: 0 ins; 1 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/22316.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/22316/head:pull/22316

PR: https://git.openjdk.org/jdk/pull/22316


More information about the core-libs-dev mailing list