Commit e9d59899 by Keith Seitz Committed by Keith Seitz

natVMVirtualMachine.cc (suspendThread): Use java.lang.StringBuilder instead of…

natVMVirtualMachine.cc (suspendThread): Use java.lang.StringBuilder instead of java.lang.StringBuffer.

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

From-SVN: r120805
parent b7e89938
2007-01-15 Keith Seitz <keiths@redhat.com>
* gnu/classpath/jdwp/natVMVirtualMachine.cc (suspendThread): Use
java.lang.StringBuilder instead of java.lang.StringBuffer.
(resumeThread): Likewise.
2007-01-15 Gary Benson <gbenson@redhat.com> 2007-01-15 Gary Benson <gbenson@redhat.com>
* java/nio/MappedByteBuffer.java: Removed. * java/nio/MappedByteBuffer.java: Removed.
......
// natVMVirtualMachine.cc - native support for VMVirtualMachine // 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. This file is part of libgcj.
...@@ -17,7 +17,7 @@ details. */ ...@@ -17,7 +17,7 @@ details. */
#include <java/lang/ClassLoader.h> #include <java/lang/ClassLoader.h>
#include <java/lang/Integer.h> #include <java/lang/Integer.h>
#include <java/lang/String.h> #include <java/lang/String.h>
#include <java/lang/StringBuffer.h> #include <java/lang/StringBuilder.h>
#include <java/lang/Thread.h> #include <java/lang/Thread.h>
#include <java/nio/ByteBuffer.h> #include <java/nio/ByteBuffer.h>
#include <java/util/ArrayList.h> #include <java/util/ArrayList.h>
...@@ -75,13 +75,12 @@ gnu::classpath::jdwp::VMVirtualMachine ::suspendThread (Thread *thread) ...@@ -75,13 +75,12 @@ gnu::classpath::jdwp::VMVirtualMachine ::suspendThread (Thread *thread)
jvmtiError err = _jdwp_jvmtiEnv->SuspendThread (thread); jvmtiError err = _jdwp_jvmtiEnv->SuspendThread (thread);
if (err != JVMTI_ERROR_NONE) if (err != JVMTI_ERROR_NONE)
{ {
using namespace gnu::gcj::runtime;
using namespace gnu::classpath::jdwp::exception; using namespace gnu::classpath::jdwp::exception;
char *reason; char *reason;
_jdwp_jvmtiEnv->GetErrorName (err, &reason); _jdwp_jvmtiEnv->GetErrorName (err, &reason);
::java::lang::String *txt String *txt = JvNewStringLatin1 ("could not suspend thread: ");
= JvNewStringLatin1 ("could not suspend thread: "); StringBuilder *msg = new StringBuilder (txt);
::java::lang::StringBuffer *msg
= new ::java::lang::StringBuffer (txt);
msg->append (JvNewStringLatin1 (reason)); msg->append (JvNewStringLatin1 (reason));
_jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason); _jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason);
throw new JdwpInternalErrorException (msg->toString ()); throw new JdwpInternalErrorException (msg->toString ());
...@@ -126,13 +125,12 @@ gnu::classpath::jdwp::VMVirtualMachine::resumeThread (Thread *thread) ...@@ -126,13 +125,12 @@ gnu::classpath::jdwp::VMVirtualMachine::resumeThread (Thread *thread)
jvmtiError err = _jdwp_jvmtiEnv->ResumeThread (thread); jvmtiError err = _jdwp_jvmtiEnv->ResumeThread (thread);
if (err != JVMTI_ERROR_NONE) if (err != JVMTI_ERROR_NONE)
{ {
using namespace gnu::gcj::runtime;
using namespace gnu::classpath::jdwp::exception; using namespace gnu::classpath::jdwp::exception;
char *reason; char *reason;
_jdwp_jvmtiEnv->GetErrorName (err, &reason); _jdwp_jvmtiEnv->GetErrorName (err, &reason);
::java::lang::String *txt String *txt = JvNewStringLatin1 ("could not resume thread: ");
= JvNewStringLatin1 ("could not resume thread: "); StringBuilder *msg = new StringBuilder (txt);
::java::lang::StringBuffer *msg
= new ::java::lang::StringBuffer (txt);
msg->append (JvNewStringLatin1 (reason)); msg->append (JvNewStringLatin1 (reason));
_jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason); _jdwp_jvmtiEnv->Deallocate ((unsigned char *) reason);
throw new JdwpInternalErrorException (msg->toString ()); throw new JdwpInternalErrorException (msg->toString ());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment