< prev index next >

src/hotspot/share/runtime/reflection.cpp

Print this page

        

@@ -1083,16 +1083,15 @@
         if (!method.is_null()) {
           // Check for abstract methods as well
           if (method->is_abstract()) {
             // new default: 6531596
             ResourceMark rm(THREAD);
-            stringStream ss;
-            ss.print("'");
-            Method::print_external_name(&ss, target_klass, method->name(), method->signature());
-            ss.print("'");
             Handle h_origexception = Exceptions::new_exception(THREAD,
-              vmSymbols::java_lang_AbstractMethodError(), ss.as_string());
+              vmSymbols::java_lang_AbstractMethodError(),
+              Method::name_and_sig_as_C_string(target_klass,
+              method->name(),
+              method->signature()));
             JavaCallArguments args(h_origexception);
             THROW_ARG_0(vmSymbols::java_lang_reflect_InvocationTargetException(),
               vmSymbols::throwable_void_signature(),
               &args);
           }

@@ -1103,17 +1102,14 @@
 
   // I believe this is a ShouldNotGetHere case which requires
   // an internal vtable bug. If you ever get this please let Karen know.
   if (method.is_null()) {
     ResourceMark rm(THREAD);
-    stringStream ss;
-    ss.print("'");
-    Method::print_external_name(&ss, klass,
-                                     reflected_method->name(),
-                                     reflected_method->signature());
-    ss.print("'");
-    THROW_MSG_0(vmSymbols::java_lang_NoSuchMethodError(), ss.as_string());
+    THROW_MSG_0(vmSymbols::java_lang_NoSuchMethodError(),
+                Method::name_and_sig_as_C_string(klass,
+                reflected_method->name(),
+                reflected_method->signature()));
   }
 
   assert(ptypes->is_objArray(), "just checking");
   int args_len = args.is_null() ? 0 : args->length();
   // Check number of arguments
< prev index next >