On Mon, 8 Dec 2025 23:44:02 GMT, Chen Liang <liach@openjdk.org> wrote:
src/java.base/share/classes/java/lang/reflect/Field.java line 349:
347: 348: /** 349: * {@return a string describing this {@code Field}}
I don't see a compelling reason to backtrack on the format of toString. Its likely to break some application or description of the field to a user.
I think the reason to change the format is some future modifiers, like ACC_STRICT_INIT, won't get printed.
Also, it helps avoid "attractive nuisance" questions like "how does the toString() of a bridge method indicate it is a bridge method"? (There is no such indication in the toString output, other than indirectly via the return type, but there is a Method.isBridge() predicate.) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/28688#discussion_r2600613169