This is the follow-up issue to address the inconsistency found while fixing JDK-4462897.
For the inner class the argument list returned by com.sun.tool.jdi.Method.arguments() method doesn't include the reference to the instance of the enclosing class. The implementation of this method calls JDWP.Method.VariableTableWithGeneric.process(vm, declaringType, ref) and the documentation for VariableTableWithGeneric class says that for instance methods the "this" reference is included in the table ("The variable table includes arguments and locals declared within the method. For instance methods, the "this" reference is included in the table."). It says nothing about the reference to the instance of the enclosing class when a method is a constructor of an inner class, however the expected behavior for this case is to have the reference to the instance of the enclosing class included in the returned arguments.
For the inner class the argument list returned by com.sun.tool.jdi.Method.arguments() method doesn't include the reference to the instance of the enclosing class. The implementation of this method calls JDWP.Method.VariableTableWithGeneric.process(vm, declaringType, ref) and the documentation for VariableTableWithGeneric class says that for instance methods the "this" reference is included in the table ("The variable table includes arguments and locals declared within the method. For instance methods, the "this" reference is included in the table."). It says nothing about the reference to the instance of the enclosing class when a method is a constructor of an inner class, however the expected behavior for this case is to have the reference to the instance of the enclosing class included in the returned arguments.
- relates to
-
JDK-4462897 JDI spec: ClassType.newInstance() throws IllegalArgumentException
- Resolved