This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/JDWP] VMVirtualMachine StringBuffer cleanup


Post-merge ping.

Keith

Keith Seitz wrote:
Hi,

I've been meaning to cleanup a lot of the gnu/classpath/jdwp/nat*.cc files, and this is one of the things that made it onto my pet peeve list recently. The attached patch switches to the gnu.gcj.runtime.StringBuffer instead of the java.lang one.

I've got some other little cleanups that I'll submit after this.

Keith

ChangeLog
2006-11-08  Keith Seitz  <keiths@redhat.com>

        * gnu/classpath/jdwp/natVMVirtualMachine.cc (suspendThread): Use
        gnu.gcj.runtime.StringBuffer instead of java.lang.StringBuffer.
        (resumeThread): Likewise.


------------------------------------------------------------------------


Index: gnu/classpath/jdwp/natVMVirtualMachine.cc
===================================================================
--- gnu/classpath/jdwp/natVMVirtualMachine.cc (revision 118009)
+++ gnu/classpath/jdwp/natVMVirtualMachine.cc (working copy)
@@ -17,7 +17,6 @@
#include <java/lang/ClassLoader.h>
#include <java/lang/Integer.h>
#include <java/lang/String.h>
-#include <java/lang/StringBuffer.h>
#include <java/lang/Thread.h>
#include <java/nio/ByteBuffer.h>
#include <java/util/ArrayList.h>
@@ -30,6 +29,7 @@
#include <gnu/classpath/jdwp/event/EventRequest.h>
#include <gnu/classpath/jdwp/exception/JdwpInternalErrorException.h>
#include <gnu/classpath/jdwp/util/MethodResult.h>
+#include <gnu/gcj/runtime/StringBuffer.h>
using namespace java::lang;
using namespace gnu::classpath::jdwp::event;
@@ -75,13 +75,12 @@
jvmtiError err = _jdwp_jvmtiEnv->SuspendThread (thread);
if (err != JVMTI_ERROR_NONE)
{
+ using namespace gnu::gcj::runtime;
using namespace gnu::classpath::jdwp::exception;
char *reason;
_jdwp_jvmtiEnv->GetErrorName (err, &reason);
- ::java::lang::String *txt
- = JvNewStringLatin1 ("could not suspend thread: ");
- ::java::lang::StringBuffer *msg
- = new ::java::lang::StringBuffer (txt);
+ String *txt = JvNewStringLatin1 ("could not suspend thread: ");
+ StringBuffer *msg = new StringBuffer (txt);
msg->append (JvNewStringLatin1 (reason));
_jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason);
throw new JdwpInternalErrorException (msg->toString ());
@@ -126,13 +125,12 @@
jvmtiError err = _jdwp_jvmtiEnv->ResumeThread (thread);
if (err != JVMTI_ERROR_NONE)
{
+ using namespace gnu::gcj::runtime;
using namespace gnu::classpath::jdwp::exception;
char *reason;
_jdwp_jvmtiEnv->GetErrorName (err, &reason);
- ::java::lang::String *txt - = JvNewStringLatin1 ("could not resume thread: ");
- ::java::lang::StringBuffer *msg
- = new ::java::lang::StringBuffer (txt);
+ String *txt = JvNewStringLatin1 ("could not resume thread: ");
+ StringBuffer *msg = new StringBuffer (txt);
msg->append (JvNewStringLatin1 (reason));
_jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason);
throw new JdwpInternalErrorException (msg->toString ());


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]