This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
[RFA] Update gnu.classpath.jdwp.value.StringValue
- From: Keith Seitz <keiths at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Wed, 20 Jun 2007 12:23:31 -0700
- Subject: [RFA] Update gnu.classpath.jdwp.value.StringValue
Hi,
Here's a simple patch to fix some buglets in StringValue. Specifically,
it was being created with the wrong tag byte and it was being written to
the wire incorrectly.
I've already committed this to classpath.
Ok?
Keith
classpath/ChangeLog
2007-07-19 Keith Seitz <keiths@redhat.com>
* 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.
* classpath/lib/gnu/classpath/jdwp/value/StringValue.class:
Regenerate.
Index: classpath/gnu/classpath/jdwp/value/StringValue.java
===================================================================
--- classpath/gnu/classpath/jdwp/value/StringValue.java (revision 125863)
+++ classpath/gnu/classpath/jdwp/value/StringValue.java (working copy)
@@ -38,7 +38,8 @@
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 StringValue(String value)
{
- super(JdwpConstants.Tag.OBJECT);
+ super(JdwpConstants.Tag.STRING);
_value = value;
}
@@ -95,6 +96,8 @@
protected void write(DataOutputStream os)
throws IOException
{
- JdwpString.writeString(os, _value);
+ ObjectId oid = VMIdManager.getDefault().getObjectId (_value);
+ oid.write (os);
+
}
}