summaryrefslogtreecommitdiff
path: root/libjava/gnu
diff options
context:
space:
mode:
authorkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-15 23:38:35 +0000
committerkseitz <kseitz@138bc75d-0d04-0410-961f-82ee72b054a4>2007-01-15 23:38:35 +0000
commit9ab548e53559668e3c43c84300ac345cd569009d (patch)
treed242d1426322b791c0372590581c9918a7295ee8 /libjava/gnu
parent93007696b1f91760e6b217a542f9f5a5d8e3b5e9 (diff)
downloadgcc-9ab548e53559668e3c43c84300ac345cd569009d.tar.gz
* gnu/classpath/jdwp/natVMVirtualMachine.cc (suspendThread): Use
java.lang.StringBuilder instead of java.lang.StringBuffer. (resumeThread): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120805 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/gnu')
-rw-r--r--libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
index 5e790b96534..522204f0fd8 100644
--- a/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
+++ b/libjava/gnu/classpath/jdwp/natVMVirtualMachine.cc
@@ -1,6 +1,6 @@
// natVMVirtualMachine.cc - native support for VMVirtualMachine
-/* Copyright (C) 2006 Free Software Foundation
+/* Copyright (C) 2006, 2007 Free Software Foundation
This file is part of libgcj.
@@ -17,7 +17,7 @@ details. */
#include <java/lang/ClassLoader.h>
#include <java/lang/Integer.h>
#include <java/lang/String.h>
-#include <java/lang/StringBuffer.h>
+#include <java/lang/StringBuilder.h>
#include <java/lang/Thread.h>
#include <java/nio/ByteBuffer.h>
#include <java/util/ArrayList.h>
@@ -75,13 +75,12 @@ gnu::classpath::jdwp::VMVirtualMachine ::suspendThread (Thread *thread)
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: ");
+ StringBuilder *msg = new StringBuilder (txt);
msg->append (JvNewStringLatin1 (reason));
_jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason);
throw new JdwpInternalErrorException (msg->toString ());
@@ -126,13 +125,12 @@ gnu::classpath::jdwp::VMVirtualMachine::resumeThread (Thread *thread)
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: ");
+ StringBuilder *msg = new StringBuilder (txt);
msg->append (JvNewStringLatin1 (reason));
_jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason);
throw new JdwpInternalErrorException (msg->toString ());