User account creation filtered due to spam.

Bug 7060 - getMethod() doesn't search super interface
Summary: getMethod() doesn't search super interface
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: libgcj (show other bugs)
Version: 3.1
: P3 normal
Target Milestone: ---
Assignee: Tom Tromey
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-17 13:46 UTC by Jeff Sturm
Modified: 2003-07-25 17:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
C.java (189 bytes, application/octet-stream)
2003-05-21 15:17 UTC, Jeff Sturm
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Sturm 2002-06-17 13:46:00 UTC
java.lang.class.getMethod() doesn't appear to search superinterfaces for method declarations.

Release:
3.1

Environment:
sparcv9-sun-solaris2.8

How-To-Repeat:
Compile/run the attached code.  JDK output:

$ java C
public abstract void A.a()
public abstract void A.a()

libgcj output:

$ ./c
public abstract void A.a()
java.lang.NoSuchMethodException
   at 0xffffffff7ec0a348: _ZN4java4lang9ThrowableC1Ev (/opt/gcc/lib/libgcj.so.3)   at 0xffffffff7ebe5e54: _ZN4java4lang5Class9getMethodEPNS0_6StringEP6JArrayIPS1_E (/opt/gcc/lib/libgcj.so.3)
Comment 1 Jeff Sturm 2002-06-18 17:30:45 UTC
From: Jeff Sturm <jsturm@one-point.com>
To: gcc-gnats@gcc.gnu.org, gcc-prs@gcc.gnu.org, jsturm@one-point.com,
   gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org, java-prs@gcc.gnu.org
Cc:  
Subject: Re: libgcj/7060: getMethod() doesn't search super interface
Date: Tue, 18 Jun 2002 17:30:45 -0400

 See http://gcc.gnu.org/ml/java-patches/2002-q2/msg00459.html for a 
 possible fix.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7060
 
Comment 2 Tom Tromey 2002-07-05 13:34:24 UTC
Responsible-Changed-From-To: unassigned->tromey
Responsible-Changed-Why: I'm handling this.
Comment 3 Tom Tromey 2002-07-05 13:34:24 UTC
State-Changed-From-To: open->closed
State-Changed-Why: I have a patch (based on Jeff's) that I'll be checking
    in shortly.
Comment 4 Tom Tromey 2002-07-05 20:40:12 UTC
From: tromey@gcc.gnu.org
To: gcc-gnats@gcc.gnu.org
Cc:  
Subject: libgcj/7060
Date: 5 Jul 2002 20:40:12 -0000

 CVSROOT:	/cvs/gcc
 Module name:	gcc
 Changes by:	tromey@gcc.gnu.org	2002-07-05 13:40:12
 
 Modified files:
 	libjava        : ChangeLog 
 	libjava/java/lang: Class.h Class.java natClass.cc 
 
 Log message:
 	2002-07-04  Tom Tromey  <tromey@redhat.com>
 	Jeff Sturm  <jsturm@one-point.com>
 	
 	Fix for PR libgcj/7060:
 	* java/lang/Class.h (_getMethod): Renamed from getMethod.
 	* java/lang/natClass.cc (_getMethod): Renamed from getMethod.
 	Recurse into superinterfaces.  Don't throw NoSuchMethodException.
 	* java/lang/Class.java (getMethod): New Java implementation;
 	complies with spec.
 	(_getMethod): New native method.
 
 Patches:
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/ChangeLog.diff?cvsroot=gcc&r1=1.1371&r2=1.1372
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/Class.h.diff?cvsroot=gcc&r1=1.45&r2=1.46
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/Class.java.diff?cvsroot=gcc&r1=1.12&r2=1.13
 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/libjava/java/lang/natClass.cc.diff?cvsroot=gcc&r1=1.51&r2=1.52