RFR: 4397513: Misleading "interface method" in InvocationHandler specification

Jaikiran Pai jpai at openjdk.org
Wed Oct 29 09:52:56 UTC 2025


On Tue, 28 Oct 2025 17:49:40 GMT, Chen Liang <liach at openjdk.org> wrote:

> Update occurrences of the not-exactly-correct "interface method" to "invoked method" because 3 Object methods are proxied too. In addition, update the description about the declaring class of the method to be more accurate so that it doesn't clash with the "duplicate method" section in Proxy.

src/java.base/share/classes/java/lang/reflect/InvocationHandler.java line 59:

> 57:      * the method invoked on the proxy instance; the declaring
> 58:      * class of the {@code Method} object may be a proxy interface,
> 59:      * one of their superinterfaces, or the {@code Object} class

Hello Chen, would it be better to word that latter part of the sentence as:

> the declaring class of the {@code Method} will either be one of the interfaces implemented by the proxy instance, or one of their super interfaces, or the {@code Object} class.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28024#discussion_r2472350430


More information about the core-libs-dev mailing list