Commit d5b7beb9 by Andrew Haley Committed by Andrew Haley

re PR libgcj/34444 (Class.getEnclosingClass() returns null on enclosed class)

2008-01-04  Andrew Haley  <aph@redhat.com>

	PR libgcj/34444
	* java/lang/natClass.cc (Class::getEnclosingClass): Call
	getDeclaringClass().

From-SVN: r131326
parent bdb69bee
2008-01-04 Andrew Haley <aph@redhat.com>
PR libgcj/34444
* java/lang/natClass.cc (Class::getEnclosingClass): Call
getDeclaringClass().
2007-12-22 David Daney <ddaney@avtrex.com>
* scripts/makemake.tcl (emit_bc_rule): Use $(LIBGCJ_BC_FLAGS)
......
......@@ -1043,7 +1043,8 @@ java::lang::Class::getEnclosingClass()
_Jv_word indexes;
indexes.i = getEnclosingMethodData();
if (indexes.i == 0)
return NULL;
// No enclosing method, but perhaps a member or anonymous class
return getDeclaringClass();
_Jv_ushort class_index, method_index;
_Jv_loadIndexes (&indexes, class_index, method_index);
return _Jv_Linker::resolve_pool_entry (this, class_index).clazz;
......
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