-
Type:
CSR
-
Resolution: Approved
-
Priority:
P4
-
Component/s: core-libs
-
None
-
behavioral
-
minimal
-
More accurate description of existing behavior.
-
Java API
-
SE
Summary
Update the references to "interface method" in InvocationHandler to be more accurate.
Problem
java.lang.reflect.InvocationHandler refers to the method dispatched to it as "interface method" which is incorrect because Object.equals/hashCode/toString can be dispatched to it too.
In addition, the declaring class is claimed to be the interface method which was invoked. This is incorrect for Object and "duplicate methods" where two interfaces have public non-static methods with the same signature.
Solution
Update those references, and reword the declaring class for the passed method.
Specification
The occurrences of "interface method" is updated to "invoked method". In addition:
@@ -54,41 +54,40 @@ public interface InvocationHandler {
* @param proxy the proxy instance that the method was invoked on
*
* @param method the {@code Method} instance corresponding to
- * the interface method invoked on the proxy instance. The declaring
- * class of the {@code Method} object will be the interface that
- * the method was declared in, which may be a superinterface of the
- * proxy interface that the proxy class inherits the method through.
+ * the method invoked on the proxy instance; the declaring
+ * class of the {@code Method} object may be a proxy interface,
+ * one of their superinterfaces, or the {@code Object} class
*
- csr of
-
JDK-4397513 Misleading "interface method" in InvocationHandler specification
-
- Resolved
-