diff options
author | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-04 17:18:56 +0000 |
---|---|---|
committer | aph <aph@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-01-04 17:18:56 +0000 |
commit | 800fe8ddcd7473a49cf8cae401a2baf09f7c14b0 (patch) | |
tree | 4c9618e7ecb416cef843ba116d6a4ab10533c456 /libjava/java | |
parent | cd3f90e25efd15a06db7a4a7d3aa51552987982b (diff) | |
download | gcc-800fe8ddcd7473a49cf8cae401a2baf09f7c14b0.tar.gz |
2008-01-04 Andrew Haley <aph@redhat.com>
PR libgcj/34444
* java/lang/natClass.cc (Class::getEnclosingClass): Call
getDeclaringClass().
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@131326 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
-rw-r--r-- | libjava/java/lang/natClass.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libjava/java/lang/natClass.cc b/libjava/java/lang/natClass.cc index 47d7739c715..5b141605f92 100644 --- a/libjava/java/lang/natClass.cc +++ b/libjava/java/lang/natClass.cc @@ -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; |