Hi,

I've committed the attached patch which does some simple housekeeping cleanup to make the code more consistent, and fix some silly error message cut-n-paste faux pas.

Keith

ChangeLog
2007-02-28  Keith Seitz  <[EMAIL PROTECTED]>

        * gnu/classpath/jdwp/processor/MethodCommandSet.java
        (executeLineTable): Use ReferenceTypeId instead of
        ClassReferenceTypeId.
        (executeVariableTable): Likewise.
        (executeVariableTableWithGeneric): Fix error message.
        * gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
        (executeSignatureWithGeneric): Fix error message.
        (executeFieldWithGeneric): Likewise.
        (executeMethodsWithGeneric): Likewise.
        * gnu/classpath/jdwp/processor/StackFrameCommandSet.java
        (executeGetValues): Use ThreadId instead of ObjectId.
        (executeSetValues): Likewise.
        (executeThisObject): Likewise.
Index: gnu/classpath/jdwp/processor/MethodCommandSet.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/processor/MethodCommandSet.java,v
retrieving revision 1.5
diff -u -p -r1.5 MethodCommandSet.java
--- gnu/classpath/jdwp/processor/MethodCommandSet.java	10 Mar 2006 00:14:05 -0000	1.5
+++ gnu/classpath/jdwp/processor/MethodCommandSet.java	28 Feb 2007 21:29:30 -0000
@@ -1,5 +1,5 @@
 /* MethodCommandSet.java -- class to implement the Method Command Set
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -43,7 +43,7 @@ import gnu.classpath.jdwp.VMMethod;
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.ClassReferenceTypeId;
+import gnu.classpath.jdwp.id.ReferenceTypeId;
 import gnu.classpath.jdwp.util.LineTable;
 import gnu.classpath.jdwp.util.VariableTable;
 
@@ -99,8 +99,7 @@ public class MethodCommandSet
   private void executeLineTable(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ClassReferenceTypeId refId
-      = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
+    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
     VMMethod method = VMMethod.readId(clazz, bb);
@@ -111,8 +110,7 @@ public class MethodCommandSet
   private void executeVariableTable(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-   ClassReferenceTypeId refId
-     = (ClassReferenceTypeId) idMan.readReferenceTypeId(bb);
+    ReferenceTypeId refId = idMan.readReferenceTypeId(bb);
     Class clazz = refId.getType();
 
     VMMethod method = VMMethod.readId(clazz, bb);
@@ -143,7 +141,7 @@ public class MethodCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command VariableTableWithGeneric not implemented.");
   }
 
 }
Index: gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java,v
retrieving revision 1.7
diff -u -p -r1.7 ReferenceTypeCommandSet.java
--- gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java	14 Mar 2006 03:50:08 -0000	1.7
+++ gnu/classpath/jdwp/processor/ReferenceTypeCommandSet.java	28 Feb 2007 21:29:30 -0000
@@ -1,6 +1,6 @@
 /* ReferenceTypeCommandSet.java -- class to implement the ReferenceType
    Command Set
-   Copyright (C) 2005, 2006 Free Software Foundation
+   Copyright (C) 2005, 2006, 2007 Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -314,7 +314,7 @@ public class ReferenceTypeCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command SignatureWithGeneric not implemented.");
   }
 
   private void executeFieldWithGeneric(ByteBuffer bb, DataOutputStream os)
@@ -322,7 +322,7 @@ public class ReferenceTypeCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command executeFieldWithGeneric not implemented.");
   }
 
   private void executeMethodsWithGeneric(ByteBuffer bb, DataOutputStream os)
@@ -330,6 +330,6 @@ public class ReferenceTypeCommandSet
   {
     // We don't have generics yet
     throw new NotImplementedException(
-      "Command SourceDebugExtension not implemented.");
+      "Command executeMethodsWithGeneric not implemented.");
   }
 }
Index: gnu/classpath/jdwp/processor/StackFrameCommandSet.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/processor/StackFrameCommandSet.java,v
retrieving revision 1.8
diff -u -p -r1.8 StackFrameCommandSet.java
--- gnu/classpath/jdwp/processor/StackFrameCommandSet.java	22 Feb 2007 21:22:26 -0000	1.8
+++ gnu/classpath/jdwp/processor/StackFrameCommandSet.java	28 Feb 2007 21:29:30 -0000
@@ -1,5 +1,5 @@
 /* StackFrameCommandSet.java -- class to implement the StackFrame Command Set
-   Copyright (C) 2005 Free Software Foundation
+   Copyright (C) 2005, 2007 Free Software Foundation
  
 This file is part of GNU Classpath.
 
@@ -45,7 +45,7 @@ import gnu.classpath.jdwp.VMVirtualMachi
 import gnu.classpath.jdwp.exception.JdwpException;
 import gnu.classpath.jdwp.exception.JdwpInternalErrorException;
 import gnu.classpath.jdwp.exception.NotImplementedException;
-import gnu.classpath.jdwp.id.ObjectId;
+import gnu.classpath.jdwp.id.ThreadId;
 import gnu.classpath.jdwp.util.Value;
 
 import java.io.DataOutputStream;
@@ -98,8 +98,8 @@ public class StackFrameCommandSet
   private void executeGetValues(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readObjectId(bb);
-    Thread thread = (Thread) tId.getObject();
+    ThreadId tId = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tId.getThread();
 
     // Although Frames look like other ids they are not. First they are not
     // ObjectIds since they don't exist in the users code. Storing them as an
@@ -123,8 +123,8 @@ public class StackFrameCommandSet
   private void executeSetValues(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readObjectId(bb);
-    Thread thread = (Thread) tId.getObject();
+    ThreadId tId = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tId.getThread();
 
     long frameID = bb.getLong();
     VMFrame frame = VMVirtualMachine.getFrame(thread, frameID);
@@ -141,8 +141,8 @@ public class StackFrameCommandSet
   private void executeThisObject(ByteBuffer bb, DataOutputStream os)
       throws JdwpException, IOException
   {
-    ObjectId tId = idMan.readObjectId(bb);
-    Thread thread = (Thread) tId.getObject();
+    ThreadId tId = (ThreadId) idMan.readObjectId(bb);
+    Thread thread = tId.getThread();
 
     long frameID = bb.getLong();
     VMFrame frame = VMVirtualMachine.getFrame(thread, frameID);

Reply via email to