From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26517 invoked by alias); 17 Dec 2012 18:38:20 -0000 Received: (qmail 26376 invoked by uid 22791); 17 Dec 2012 18:38:17 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED X-Spam-Check-By: sourceware.org Received: from wildebeest.demon.nl (HELO gnu.wildebeest.org) (212.238.236.112) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 17 Dec 2012 18:38:09 +0000 Received: from wildebeest.demon.nl ([212.238.236.112] helo=[172.31.17.37]) by gnu.wildebeest.org with esmtp (Exim 4.63) (envelope-from ) id 1TkfZg-0000JV-H9; Mon, 17 Dec 2012 19:38:02 +0100 Subject: Re: [cp-patches] [4.8 Regression] gjavah throws an exception From: Mark Wielaard To: Andrew Haley Cc: classpath-patches , "java@gcc.gnu.org" In-Reply-To: <50CF3C9D.50203@redhat.com> References: <50CF3C9D.50203@redhat.com> Content-Type: text/plain; charset="UTF-8" Date: Mon, 17 Dec 2012 18:38:00 -0000 Message-ID: <1355769481.3850.57.camel@bordewijk.wildebeest.org> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Spam-Score: -1.9 (-) X-IsSubscribed: yes Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org X-SW-Source: 2012-12/txt/msg00012.txt.bz2 On Mon, 2012-12-17 at 15:39 +0000, Andrew Haley wrote: > If a class has inner classes, those inner classes are searched on > the classpath. This is wrong if the argument to javah is a filename: > the inner class may not exist on the classpath, and even if they do > they will be the wrong versions. > > IMO, if given filenames gjavah should not search for inner classes > at all. This patch does so. > [...] > 2012-12-17 Andrew Haley > > * tools/gnu/classpath/tools/javah/Main.java (parseClasses): Dont > scan inner classes if our item is a file. That looks right to me. As you said on irc, no other javah implementation seems to support "raw class files" as input. Others only seem to accept class names. So there is no "best practice" to follow in this case. Not trying to search for inner classes when a class file is provided seems a good choice since at the bytecode level there really isn't such a thing as an inner class (just funnily named classes). Thanks, Mark