RFR: 8373186: Improve readability of core reflection toString specifications
Alan Bateman
alanb at openjdk.org
Mon Dec 8 09:09:16 UTC 2025
On Sat, 6 Dec 2025 21:35:57 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Partial implementation of a spec refactoring to get some feedback before writing similar changes for other core reflection types.
src/java.base/share/classes/java/lang/reflect/Field.java line 349:
> 347:
> 348: /**
> 349: * {@return a string describing this {@code Field}}
Field::toString has been specified this way since JDK 1.1 and we have to assume there are frameworks or libraries that would break if we were ever change the format of the String representation. Would it be possible to put more context for the proposal in the JBS or PR? I think I'm mostly trying to understand if this is just about readability or whether an incompatible change to the string representation might follow.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28688#discussion_r2597701327
More information about the core-libs-dev
mailing list