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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 4/9/07, Robert Lougher <rob.lougher@xxxxxxxxx> wrote:
Hi Andrew,

On 4/8/07, Andrew Haley <aph@xxxxxxxxxx> 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 problem lies.  The class
>  > "java.util.Hashtable$HashEntry" is private, so I don't know if
>  > bsh.Reflect should have a reference anyway.
>
> Can you try this again, but with bsh 2.0 ?  I've been having a lot of
> problems with bsh, all of which went away when I upgraded to 2.0.
>

I can't be certain without knowing exactly what's changed, but it
looks like the problem has been fixed somewhere between Classpath-0.93
and now.  With the extra reflection checks, Classpath CVS HEAD works
with both bsh 1.3.0 and 2.0(b2), but both throw the exception with
Classpath-0.93...


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 contains a
class SimpleEntry which implements getValue().  SimpleEntry is public.
Obviously, this is accessible...

Rob.

> Andrew.
>
> --
> Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, UK
> Registered in England and Wales No. 3798903
>



[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux