< prev index next >

src/hotspot/share/prims/nativeLookup.cpp

Print this page

        

@@ -22,15 +22,15 @@
  *
  */
 
 #include "precompiled.hpp"
 #include "classfile/javaClasses.hpp"
-#include "classfile/symbolTable.hpp"
 #include "classfile/systemDictionary.hpp"
 #include "classfile/vmSymbols.hpp"
 #include "memory/oopFactory.hpp"
 #include "memory/resourceArea.hpp"
+#include "memory/universe.hpp"
 #include "oops/instanceKlass.hpp"
 #include "oops/method.hpp"
 #include "oops/oop.inline.hpp"
 #include "oops/symbol.hpp"
 #include "prims/jvm_misc.hpp"

@@ -378,15 +378,12 @@
   // JVM TI prefixes which have been applied to the native method name.
   entry = lookup_entry_prefixed(method, in_base_library, THREAD);
   if (entry != NULL) return entry;
 
   // Native function not found, throw UnsatisfiedLinkError
-  stringStream ss;
-  ss.print("'");
-  method->print_external_name(&ss);
-  ss.print("'");
-  THROW_MSG_0(vmSymbols::java_lang_UnsatisfiedLinkError(), ss.as_string());
+  THROW_MSG_0(vmSymbols::java_lang_UnsatisfiedLinkError(),
+              method->name_and_sig_as_C_string());
 }
 
 
 address NativeLookup::lookup(const methodHandle& method, bool& in_base_library, TRAPS) {
   if (!method->has_native_function()) {

@@ -405,13 +402,13 @@
 }
 
 address NativeLookup::base_library_lookup(const char* class_name, const char* method_name, const char* signature) {
   EXCEPTION_MARK;
   bool in_base_library = true;  // SharedRuntime inits some math methods.
-  TempNewSymbol c_name = SymbolTable::new_symbol(class_name);
-  TempNewSymbol m_name = SymbolTable::new_symbol(method_name);
-  TempNewSymbol s_name = SymbolTable::new_symbol(signature);
+  TempNewSymbol c_name = SymbolTable::new_symbol(class_name,  CATCH);
+  TempNewSymbol m_name = SymbolTable::new_symbol(method_name, CATCH);
+  TempNewSymbol s_name = SymbolTable::new_symbol(signature,   CATCH);
 
   // Find the class
   Klass* k = SystemDictionary::resolve_or_fail(c_name, true, CATCH);
   InstanceKlass* klass  = InstanceKlass::cast(k);
 
< prev index next >