Hi,

I've committed that attached patch which fixes two little buglets in gnu.classpath.jdwp.value.StringValue: 1) we were recording the tag byte as OBJECT instead of STRING and 2) String values are written on the wire as a one byte signature tag followed by an object ID.

If there are any problems with this, please let me know.

Keith

ChangeLog
2007-07-19  Keith Seitz  <[EMAIL PROTECTED]>

        * classpath/gnu/classpath/jdwp/value/StringValue.java
        (StringValue): Tag of StringValue is STRING not OBJECT.
        (write): String values are written to the wire as tag byte
        and object ID, not JdwpString.
Index: gnu/classpath/jdwp/value/StringValue.java
===================================================================
RCS file: /sources/classpath/classpath/gnu/classpath/jdwp/value/StringValue.java,v
retrieving revision 1.1
diff -u -p -r1.1 StringValue.java
--- gnu/classpath/jdwp/value/StringValue.java	9 Mar 2007 21:23:10 -0000	1.1
+++ gnu/classpath/jdwp/value/StringValue.java	19 Jun 2007 22:10:24 -0000
@@ -38,7 +38,8 @@ exception statement from your version. *
 package gnu.classpath.jdwp.value;
 
 import gnu.classpath.jdwp.JdwpConstants;
-import gnu.classpath.jdwp.util.JdwpString;
+import gnu.classpath.jdwp.VMIdManager;
+import gnu.classpath.jdwp.id.ObjectId;
 
 import java.io.DataOutputStream;
 import java.io.IOException;
@@ -61,7 +62,7 @@ public final class StringValue
    */
   public StringValue(String value)
   {
-    super(JdwpConstants.Tag.OBJECT);
+    super(JdwpConstants.Tag.STRING);
     _value = value;
   }
   
@@ -95,6 +96,8 @@ public final class StringValue
   protected void write(DataOutputStream os)
     throws IOException
   {
-    JdwpString.writeString(os, _value);
+    ObjectId oid = VMIdManager.getDefault().getObjectId (_value);
+    oid.write (os);
+
   }
 }

Reply via email to