aboutsummaryrefslogtreecommitdiff
path: root/libjava/resolve.cc
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2002-09-25 20:40:09 +0000
committerTom Tromey <tromey@gcc.gnu.org>2002-09-25 20:40:09 +0000
commitfd44a92df60208084fda548f0d2be237d25735e2 (patch)
tree7a95909ce5f317195493ac83a8616500c5760369 /libjava/resolve.cc
parent7ea082bbb514fb2b9afbb8f081e21f287ba86431 (diff)
downloadgcc-fd44a92df60208084fda548f0d2be237d25735e2.zip
gcc-fd44a92df60208084fda548f0d2be237d25735e2.tar.gz
gcc-fd44a92df60208084fda548f0d2be237d25735e2.tar.bz2
resolve.cc: Include StringBuffer.
* resolve.cc: Include StringBuffer. (_Jv_ResolvePoolEntry): Use StringBuffer to create error string. From-SVN: r57515
Diffstat (limited to 'libjava/resolve.cc')
-rw-r--r--libjava/resolve.cc27
1 files changed, 15 insertions, 12 deletions
diff --git a/libjava/resolve.cc b/libjava/resolve.cc
index f558755..90df67b 100644
--- a/libjava/resolve.cc
+++ b/libjava/resolve.cc
@@ -20,6 +20,7 @@ details. */
#include <java-cpool.h>
#include <java/lang/Class.h>
#include <java/lang/String.h>
+#include <java/lang/StringBuffer.h>
#include <java/lang/Thread.h>
#include <java/lang/InternalError.h>
#include <java/lang/VirtualMachineError.h>
@@ -201,12 +202,13 @@ _Jv_ResolvePoolEntry (jclass klass, int index)
end_of_field_search:
if (the_field == 0)
{
- jstring msg = JvNewStringLatin1 ("field ");
- msg = msg->concat (owner->getName ());
- msg = msg->concat (JvNewStringLatin1("."));
- msg = msg->concat (_Jv_NewStringUTF (field_name->data));
- msg = msg->concat (JvNewStringLatin1(" was not found."));
- throw_incompatible_class_change_error (msg);
+ java::lang::StringBuffer *sb = new java::lang::StringBuffer();
+ sb->append(JvNewStringLatin1("field "));
+ sb->append(owner->getName());
+ sb->append(JvNewStringLatin1("."));
+ sb->append(_Jv_NewStringUTF(field_name->data));
+ sb->append(JvNewStringLatin1(" was not found."));
+ throw_incompatible_class_change_error(sb->toString());
}
pool->data[index].field = the_field;
@@ -312,12 +314,13 @@ _Jv_ResolvePoolEntry (jclass klass, int index)
if (the_method == 0)
{
- jstring msg = JvNewStringLatin1 ("method ");
- msg = msg->concat (owner->getName ());
- msg = msg->concat (JvNewStringLatin1("."));
- msg = msg->concat (_Jv_NewStringUTF (method_name->data));
- msg = msg->concat (JvNewStringLatin1(" was not found."));
- throw new java::lang::NoSuchMethodError (msg);
+ java::lang::StringBuffer *sb = new java::lang::StringBuffer();
+ sb->append(JvNewStringLatin1("method "));
+ sb->append(owner->getName());
+ sb->append(JvNewStringLatin1("."));
+ sb->append(_Jv_NewStringUTF(method_name->data));
+ sb->append(JvNewStringLatin1(" was not found."));
+ throw new java::lang::NoSuchMethodError (sb->toString());
}
pool->data[index].rmethod =