This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: ClassLoader: unexpected exception during linking


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;
 	}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]