diff -r 57490e455c30 src/share/vm/classfile/javaClasses.cpp
--- a/src/share/vm/classfile/javaClasses.cpp	Thu Dec 11 13:39:41 2014 -0800
+++ b/src/share/vm/classfile/javaClasses.cpp	Tue Dec 16 13:36:43 2014 +0100
@@ -1419,21 +1419,14 @@
 
 // Print stack trace element to resource allocated buffer
 char* java_lang_Throwable::print_stack_element_to_buffer(Handle mirror,
-                                  int method_id, int version, int bci) {
+                                  methodHandle mhandle, int version, int bci) {
 
   // Get strings and string lengths
   InstanceKlass* holder = InstanceKlass::cast(java_lang_Class::as_Klass(mirror()));
   const char* klass_name  = holder->external_name();
   int buf_len = (int)strlen(klass_name);
 
-  // The method id may point to an obsolete method, can't get more stack information
-  Method* method = holder->method_with_idnum(method_id);
-  if (method == NULL) {
-    char* buf = NEW_RESOURCE_ARRAY(char, buf_len + 64);
-    // This is what the java code prints in this case - added Redefined
-    sprintf(buf, "\tat %s.null (Redefined)", klass_name);
-    return buf;
-  }
+  Method* method = mhandle();
 
   char* method_name = method->name()->as_C_string();
   buf_len += (int)strlen(method_name);
@@ -1481,17 +1474,16 @@
 }
 
 void java_lang_Throwable::print_stack_element(outputStream *st, Handle mirror,
-                                              int method_id, int version, int bci) {
+                                              methodHandle method, int version, int bci) {
   ResourceMark rm;
-  char* buf = print_stack_element_to_buffer(mirror, method_id, version, bci);
+  char* buf = print_stack_element_to_buffer(mirror, method, version, bci);
   st->print_cr("%s", buf);
 }
 
 void java_lang_Throwable::print_stack_element(outputStream *st, methodHandle method, int bci) {
   Handle mirror = method->method_holder()->java_mirror();
-  int method_id = method->method_idnum();
   int version = method->constants()->version();
-  print_stack_element(st, mirror, method_id, version, bci);
+  print_stack_element(st, mirror, method, version, bci);
 }
 
 const char* java_lang_Throwable::no_stack_trace_message() {
@@ -1522,10 +1514,13 @@
         Handle mirror(THREAD, mirrors->obj_at(index));
         // NULL mirror means end of stack trace
         if (mirror.is_null()) goto handle_cause;
-        int method = methods->short_at(index);
+        int method_id = methods->short_at(index);
         int version = version_at(bcis->int_at(index));
         int bci = bci_at(bcis->int_at(index));
-        print_stack_element(st, mirror, method, version, bci);
+        InstanceKlass* holder = InstanceKlass::cast(java_lang_Class::as_Klass(mirror()));
+        Method* method = holder->method_with_idnum(method_id);
+        methodHandle mh(THREAD, method);
+        print_stack_element(st, mirror, mh, version, bci);
       }
       result = objArrayHandle(THREAD, objArrayOop(result->obj_at(trace_next_offset)));
     }
@@ -1816,7 +1811,7 @@
 
   assert(methods != NULL && bcis != NULL && mirrors != NULL, "sanity check");
 
-  int method = methods->short_at(chunk_index);
+  int method_id = methods->short_at(chunk_index);
   int version = version_at(bcis->int_at(chunk_index));
   int bci = bci_at(bcis->int_at(chunk_index));
   Handle mirror(THREAD, mirrors->obj_at(chunk_index));
@@ -1825,12 +1820,15 @@
   if (mirror.is_null()) {
     THROW_(vmSymbols::java_lang_IndexOutOfBoundsException(), NULL);
   }
-
-  oop element = java_lang_StackTraceElement::create(mirror, method, version, bci, CHECK_0);
+  InstanceKlass* holder = InstanceKlass::cast(java_lang_Class::as_Klass(mirror()));
+  Method* method = holder->method_with_idnum(method_id);
+  methodHandle mh(THREAD, method);
+
+  oop element = java_lang_StackTraceElement::create(mirror, mh, version, bci, CHECK_0);
   return element;
 }
 
-oop java_lang_StackTraceElement::create(Handle mirror, int method_id,
+oop java_lang_StackTraceElement::create(Handle mirror, methodHandle mhandle,
                                         int version, int bci, TRAPS) {
   // Allocate java.lang.StackTraceElement instance
   Klass* k = SystemDictionary::StackTraceElement_klass();
@@ -1848,14 +1846,7 @@
   oop classname = StringTable::intern((char*) str, CHECK_0);
   java_lang_StackTraceElement::set_declaringClass(element(), classname);
 
-  Method* method = holder->method_with_idnum(method_id);
-  // Method on stack may be obsolete because it was redefined so cannot be
-  // found by idnum.
-  if (method == NULL) {
-    // leave name and fileName null
-    java_lang_StackTraceElement::set_lineNumber(element(), -1);
-    return element();
-  }
+  Method* method = mhandle();
 
   // Fill in method name
   oop methodname = StringTable::intern(method->name(), CHECK_0);
@@ -1881,8 +1872,7 @@
 
 oop java_lang_StackTraceElement::create(methodHandle method, int bci, TRAPS) {
   Handle mirror (THREAD, method->method_holder()->java_mirror());
-  int method_id = method->method_idnum();
-  return create(mirror, method_id, method->constants()->version(), bci, THREAD);
+  return create(mirror, method, method->constants()->version(), bci, THREAD);
 }
 
 void java_lang_reflect_AccessibleObject::compute_offsets() {
diff -r 57490e455c30 src/share/vm/classfile/javaClasses.hpp
--- a/src/share/vm/classfile/javaClasses.hpp	Thu Dec 11 13:39:41 2014 -0800
+++ b/src/share/vm/classfile/javaClasses.hpp	Tue Dec 16 13:36:43 2014 +0100
@@ -496,7 +496,7 @@
   static int static_unassigned_stacktrace_offset;
 
   // Printing
-  static char* print_stack_element_to_buffer(Handle mirror, int method, int version, int bci);
+  static char* print_stack_element_to_buffer(Handle mirror, methodHandle mhandle, int version, int bci);
   // StackTrace (programmatic access, new since 1.4)
   static void clear_stacktrace(oop throwable);
   // No stack trace available
@@ -516,7 +516,7 @@
   static oop message(oop throwable);
   static oop message(Handle throwable);
   static void set_message(oop throwable, oop value);
-  static void print_stack_element(outputStream *st, Handle mirror, int method,
+  static void print_stack_element(outputStream *st, Handle mirror, methodHandle method,
                                   int version, int bci);
   static void print_stack_element(outputStream *st, methodHandle method, int bci);
   static void print_stack_usage(Handle stream);
@@ -1326,7 +1326,7 @@
   static void set_lineNumber(oop element, int value);
 
   // Create an instance of StackTraceElement
-  static oop create(Handle mirror, int method, int version, int bci, TRAPS);
+  static oop create(Handle mirror, methodHandle method, int version, int bci, TRAPS);
   static oop create(methodHandle method, int bci, TRAPS);
 
   // Debugging
