This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: ClassLoader: unexpected exception during linking
- From: Per Bothner <per at bothner dot com>
- To: tromey at redhat dot com
- Cc: java at gcc dot gnu dot org, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Wed, 04 Dec 2002 23:43:40 -0800
- Subject: Re: ClassLoader: unexpected exception during linking
- References: <Pine.LNX.4.44.0212031448440.24066-100000@ops2.one-point.com> <87u1hs7w27.fsf@fleche.redhat.com>
Tom Tromey wrote:
The appended fixes the hang I noticed with your initial patch. It
also fixes the original problem Per reported. I'm checking it in.
Thanks! I haven't tested your patch - but (using Jeff's patch), I found
another problem. I was getting an IllegalAccessException. Visual
inspection of teh code (i.e. I haevn't tested it yet) suggests that
"protected" isn't implemente correct, and the appended patch is needed.
I'll write a change log after I test it.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
Index: resolve.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/resolve.cc,v
retrieving revision 1.33
diff -u -r1.33 resolve.cc
--- resolve.cc 4 Nov 2002 02:45:31 -0000 1.33
+++ resolve.cc 5 Dec 2002 07:51:43 -0000
@@ -347,11 +347,11 @@
if (cls == klass
|| ((method->accflags & Modifier::PUBLIC) != 0)
- || (((method->accflags & Modifier::PROTECTED) != 0)
- && cls->isAssignableFrom (klass))
|| (((method->accflags & Modifier::PRIVATE) == 0)
&& _Jv_ClassNameSamePackage (cls->name,
- klass->name)))
+ klass->name))
+ || (((method->accflags & Modifier::PROTECTED) != 0)
+ && cls->isAssignableFrom (klass)))
{
return method;
}