From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15393 invoked by alias); 4 Jan 2008 17:08:59 -0000 Received: (qmail 15385 invoked by uid 22791); 4 Jan 2008 17:08:58 -0000 X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 04 Jan 2008 17:08:39 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id m04H8Z4I020482 for ; Fri, 4 Jan 2008 12:08:35 -0500 Received: from zebedee.littlepinkcloud.COM (vpn-14-13.rdu.redhat.com [10.11.14.13]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id m04H8Y3L001009; Fri, 4 Jan 2008 12:08:34 -0500 Received: from littlepinkcloud.COM (localhost.localdomain [127.0.0.1]) by zebedee.littlepinkcloud.COM (8.13.8/8.13.5) with ESMTP id m04H8Xu5010081; Fri, 4 Jan 2008 17:08:33 GMT Received: (from aph@localhost) by littlepinkcloud.COM (8.13.8/8.13.5/Submit) id m04H8XGM010078; Fri, 4 Jan 2008 17:08:33 GMT MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <18302.26641.337409.138760@zebedee.pink> Date: Fri, 04 Jan 2008 17:08:00 -0000 From: Andrew Haley To: java-patches@gcc.gnu.org Subject: PR libgcj/34444: Class.getEnclosingClass() returns null on enclosed class X-Mailer: VM 7.19 under Emacs 22.0.93.1 X-IsSubscribed: yes Mailing-List: contact java-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-patches-owner@gcc.gnu.org X-SW-Source: 2008-q1/txt/msg00006.txt.bz2 Another case where Sun's javadoc was rather vague. Andrew. 2008-01-04 Andrew Haley PR libgcj/34444 * java/lang/natClass.cc (Class::getEnclosingClass): Call getDeclaringClass(). Index: natClass.cc =================================================================== --- natClass.cc (revision 131034) +++ natClass.cc (working copy) @@ -1043,7 +1043,8 @@ _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; -- Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK Registered in England and Wales No. 3798903