[kaffe] Should IllegalAccessException be thrown or not?
Ito Kazumitsu
kaz at maczuka.gcd.org
Sun Dec 11 22:21:26 PST 2005
From: Ito Kazumitsu <kaz at maczuka.gcd.org>
Date: Mon, 12 Dec 2005 11:35:59 +0900 (JST)
> kaffe/kaffevm/access.c has this code:
>
> 261 else if( same_package && !(target_flags & ACC_PRIVATE) )
> 262 {
> 263 /* Package. */
> 264 slot_acc = 1;
> 265 }
> I am afraid this makes anything private in the target class T
> accessible to the caller C if T and C are in the same package
> and T is accessible to C.
This is not the case thanks to the "!" of "!(target_flags & ACC_PRIVATE)".
But I am afraid
266 else if( (target->name->data[0] != '[') &&
267 same_package &&
268 (target->this_inner_index >= 0) )
269 {
270 slot_acc = 1;
271 }
will make something private in the target class T accessible to
the caller C if T and C are in the same package and T is a nested
class.
More information about the kaffe
mailing list