Re: Method.invoke() on a non-public class from another package

2007-04-11 Thread Andrew Haley
Andrew Haley writes: Andrew Haley writes: Robert Lougher writes: Had a quick look, and in Classpath-0.93 java.util.AbstractMap contains a class BasicMapEntry which implements getValue(). BasicMapEntry is package-private. This isn't accessible outside the package.

Re: Method.invoke() on a non-public class from another package

2007-04-10 Thread Andrew Haley
Robert Lougher writes: Had a quick look, and in Classpath-0.93 java.util.AbstractMap contains a class BasicMapEntry which implements getValue(). BasicMapEntry is package-private. This isn't accessible outside the package. In CVS HEAD, this has changed and java.util.AbstractMap

Re: Method.invoke() on a non-public class from another package

2007-04-10 Thread Andrew Haley
Andrew Haley writes: Robert Lougher writes: Had a quick look, and in Classpath-0.93 java.util.AbstractMap contains a class BasicMapEntry which implements getValue(). BasicMapEntry is package-private. This isn't accessible outside the package. In CVS HEAD, this has

Method.invoke() on a non-public class from another package

2007-04-08 Thread Mark Wielaard
On Sun, 2007-04-08 at 12:53 +0200, Christian Thalinger wrote: Grrr, I hate this access checks. I'll try to fix that _again_. This seems to be pretty subtle and we found multiple runtimes (jamvm, cacao, gcj and kaffe at least) that seem to get this wrong. And the online documentation is not very

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Christian Thalinger
On Sun, 2007-04-08 at 23:12 +0200, Mark Wielaard wrote: Attached is a simplified test case (3 classes - c1 is in package p1, c2 and c3 are in package p2, c2 is not public, p1.c1 is the entry point) that should throw an IllegalAccessException on the line: m.invoke(o, new Object[0]); Sun's RI

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Robert Lougher
Hi Mark, On 4/8/07, Mark Wielaard [EMAIL PROTECTED] wrote: On Sun, 2007-04-08 at 12:53 +0200, Christian Thalinger wrote: Grrr, I hate this access checks. I'll try to fix that _again_. This seems to be pretty subtle and we found multiple runtimes (jamvm, cacao, gcj and kaffe at least) that

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Andrew Haley
Mark Wielaard writes: On Sun, 2007-04-08 at 12:53 +0200, Christian Thalinger wrote: Grrr, I hate this access checks. I'll try to fix that _again_. This seems to be pretty subtle and we found multiple runtimes (jamvm, cacao, gcj and kaffe at least) that seem to get this wrong. And the

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Christian Thalinger
On Sun, 2007-04-08 at 22:41 +0100, Robert Lougher wrote: Strangely enough, I _did_ fix this in JamVM 1.4.4, but then removed the checks again in JamVM 1.4.5! http://cvs.berlios.de/cgi-bin/viewcvs.cgi/jamvm/jamvm/src/reflect.c.diff?r1=1.9r2=1.10 If I remember the reason for removing it

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Robert Lougher
Hi, On 4/8/07, Robert Lougher [EMAIL PROTECTED] wrote: Hi Mark, On 4/8/07, Mark Wielaard [EMAIL PROTECTED] wrote: On Sun, 2007-04-08 at 12:53 +0200, Christian Thalinger wrote: Grrr, I hate this access checks. I'll try to fix that _again_. This seems to be pretty subtle and we found

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Andrew Haley
Robert Lougher writes: Anyway, I've found what it broke and my original analysis. After putting this in, BeanShell GUI stopped working with JamVM. This was found during 0.93 testing: ... I don't know where the problem lies. The class java.util.Hashtable$HashEntry is

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Christian Thalinger
On Sun, 2007-04-08 at 23:00 +0100, Robert Lougher wrote: Anyway, I've found what it broke and my original analysis. After putting this in, BeanShell GUI stopped working with JamVM. This was found during 0.93 testing: http://www.mail-archive.com/classpath@gnu.org/msg13811.html I did an

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Robert Lougher
Hi Twisti, On 4/8/07, Christian Thalinger [EMAIL PROTECTED] wrote: On Sun, 2007-04-08 at 23:00 +0100, Robert Lougher wrote: Anyway, I've found what it broke and my original analysis. After putting this in, BeanShell GUI stopped working with JamVM. This was found during 0.93 testing:

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Robert Lougher
Hi Andrew, On 4/8/07, Andrew Haley [EMAIL PROTECTED] wrote: Robert Lougher writes: Anyway, I've found what it broke and my original analysis. After putting this in, BeanShell GUI stopped working with JamVM. This was found during 0.93 testing: ... I don't know where the

Re: Method.invoke() on a non-public class from another package

2007-04-08 Thread Robert Lougher
Hi, On 4/9/07, Robert Lougher [EMAIL PROTECTED] wrote: Hi Andrew, On 4/8/07, Andrew Haley [EMAIL PROTECTED] wrote: Robert Lougher writes: Anyway, I've found what it broke and my original analysis. After putting this in, BeanShell GUI stopped working with JamVM. This was found