Bug 4105 - gcj doesn't generate inner class reflection info
gcj doesn't generate inner class reflection info
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: java
unknown
: P3 normal
: 4.3.0
Assigned To: Tom Tromey
:
: 9716 (view as bug list)
Depends on: 28067
Blocks: 15714 18131
  Show dependency treegraph
 
Reported: 2001-08-23 16:16 UTC by Tom Tromey
Modified: 2007-01-09 20:43 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-07-21 19:17:03


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Tromey 2001-08-23 16:16:01 UTC
gcj doesn't generate enough reflection information.
In particular it doesn't generate information about:
* The declaring class (for an inner class)
* Inner classes declared in this class
* Inner interfaces declared in this class

This info is required to implement certain reflection
methods in java.lang.Class

Release:
unknown
Comment 1 Andrew Pinski 2003-07-27 19:05:19 UTC
Still true on the mainline (20030727).
Comment 2 Andrew Pinski 2003-08-17 20:47:48 UTC
*** Bug 9716 has been marked as a duplicate of this bug. ***
Comment 3 Andrew Pinski 2003-08-17 20:48:21 UTC
From Bug 9716:
This produces the following Mauve failures:

FAIL: gnu.testlet.java.lang.Class.reflect2: getClasses (number 2)
number 3: java.lang.ArrayIndexOutOfBoundsException: 0
FAIL: gnu.testlet.java.lang.Class.reflect2: getClasses (number 3)
FAIL: gnu.testlet.java.lang.Class.reflect2: getClasses (number 5)
FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaringClass (number 3)
FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaringClass (number 4)
FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaringClass (number 5)
FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaredClasses (number 1)
FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaredClasses (number 2)
FAIL: gnu.testlet.java.lang.Class.reflect2: getDeclaredClasses (number 3)
Comment 4 Tom Tromey 2006-07-21 23:56:15 UTC
Subject: Bug 4105

Author: tromey
Date: Fri Jul 21 23:56:04 2006
New Revision: 115657

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=115657
Log:
	PR libgcj/4105:
	* java/lang/natClass.cc (findInnerClassAttribute): New method.
	(findDeclaredClasses): Likewise.
	(getDeclaredClasses): Implemented.
	(getDeclaringClass): Likewise.
	(isAnonymousClass): Likewise.
	(isMemberClass): Likewise.
	(check_constant): Pass message in exception.  Allow resolved
	constants.
	(resolve_class_constant): New function.
	* defineclass.cc (read_one_class_attribute): Handle InnerClasses.
	* java/lang/Class.h (isAnonymousClass, isLocalClass,
	isMemberClass): Declare.
	* java/lang/Class.java (getSimpleName): Implemented.
	(isAnonymousClass, isLocalClass, isMemberClass): New methods.

Modified:
    branches/gcj-eclipse/libjava/ChangeLog
    branches/gcj-eclipse/libjava/defineclass.cc
    branches/gcj-eclipse/libjava/java/lang/Class.h
    branches/gcj-eclipse/libjava/java/lang/Class.java
    branches/gcj-eclipse/libjava/java/lang/natClass.cc

Comment 5 Tom Tromey 2007-01-09 20:43:28 UTC
All gcj front end bugs have been fixed by the gcj-eclipse branch merge.
I'm mass-closing the affected PRs.
If you believe one of these was closed in error, please reopen it
with a note explaining why.
Thanks.