[RFA/JDWP] JdwpConnection cleanup

Keith Seitz keiths@redhat.com
Thu Jun 30 17:34:00 GMT 2005


On Mon, 2005-06-27 at 17:23 -0400, Bryce McKinlay wrote:

> Yes, this looks better.
[snip]
> However, there is still a bit too much copying going on - couldn't 
> JdwpPacket.toBytes() write directly to the stream, instead of creating 
> another temporary byte[]? That can be fixed in another patch, though.

> I think I liked the old sendPacket() name better, but maybe thats just me :)

I've addressed these concerns in the following two patches. Patch #1
contains the original changes submitted. Patch #2 addresses the
JdwpPacket.toBytes issue.

?
Keith

ChangeLog #1

2005-06-30  Keith Seitz  <keiths@redhat.com>

	* gnu/classpath/jdwp/transport/JdwpConnection.java (sendEvent): New
	method.
	(_bytes): New member.
	(_doStream): New member.
	(JdwpConnection): Initialize new members.

ChangeLog #2
2005-06-30  Keith Seitz  <keiths@redhat.com>

	* gnu/classpath/jdwp/transport/JdwpPacket.java (write): New method.
	(myWrite): New abstract method.
	(toBytes): Remove.
	(myToBytes): Remove.
	* gnu/classpath/jdwp/transport/JdwpReplyPacket.java (myWrite): New
	method.
	* gnu/classpath/jdwp/transport/JdwpCommandPacket.java (myWrite): New
	method.
	* gnu/classpath/jdwp/transport/JdwpConnection.java (sendPacket): Use
	JdwpPacket.write instead of JdwpPacket.toBytes.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdwp-connection-1.patch
Type: text/x-patch
Size: 2599 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050630/bec76d39/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: jdwp-connection-2.patch
Type: text/x-patch
Size: 5116 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050630/bec76d39/attachment-0001.bin>


More information about the Java-patches mailing list