[cp-patches] Re: [RFA/JDWP] JdwpConnection cleanup
Keith Seitz wrote: 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 [EMAIL PROTECTED] * 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 [EMAIL PROTECTED] * 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. Both OK. Thanks! Bryce ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: [RFA/JDWP] JdwpConnection cleanup
Keith Seitz wrote: I believe the attached patch addresses concerns over temporary OutputStream allocations. Yes, this looks better. At least by using reset() on the ByteArrayOutputStream we are eliminating one level of allocation and potential copying. Aaron managed to convince me that the ByteArrayOutputStream was better than using ByteBuffer, at least for now. 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. The changes in this patch are reflected in gnu.classpath.jdwp.event.Event submission. Comments/questions/concerns? Keith ChangeLog * gnu/classpath/jdwp/transport/JdwpConnection.java (sendPacket): Rename to ... (send): ... this. (send): New overloaded method for sending Events. I think I liked the old sendPacket() name better, but maybe thats just me :) Otherwise, this looks OK. Bryce ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches