This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[RFA/JDWP] Fix ReferenceType.Methods for Interfaces
- From: Kyle Galloway <kgallowa at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Fri, 11 May 2007 15:39:03 -0400
- Subject: [RFA/JDWP] Fix ReferenceType.Methods for Interfaces
Currently, since the id is immediately cast into a ClassReferenceTypeId,
this method will fail for Interfaces. This patch, which is already in
Classpath, fixes this by removing the cast and using a generic
RegerenceTypeId. This allows Interface methods to be properly retrieved.
ChangeLog
2007-05-11 Kyle Galloway <kgallowa@redhat.com>
* classpath/gnu/classpath/jdwp/processor/ReferenceTypeId.java
(executeMethods): Remove cast to ClassReferenceTypeId.
Questions/issues?
Thanks,
Kyle
Index: classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
===================================================================
--- classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java (revision 124570)
+++ classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java (working copy)
@@ -183,8 +183,7 @@
private void executeMethods(ByteBuffer bb, DataOutputStream os)
throws JdwpException, IOException
{
- ClassReferenceTypeId refId
- = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
+ ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
Class clazz = refId.getType();
VMMethod[] methods = VMVirtualMachine.getAllClassMethods(clazz);