ObjectStreamClass.java (findAccessibleMethod): Allow protected readResolve().
2005-09-16 Andrew Haley <aph@redhat.com> * java/io/ObjectStreamClass.java (findAccessibleMethod): Allow protected readResolve(). Rewrite accessibility check. From-SVN: r107027
This commit is contained in:
parent
55f9959db8
commit
089aaefeba
2 changed files with 14 additions and 8 deletions
|
@ -514,14 +514,15 @@ outer:
|
|||
{
|
||||
Method res = c.getDeclaredMethod(name, noArgs);
|
||||
int mods = res.getModifiers();
|
||||
|
||||
if (c != from
|
||||
&& (Modifier.isPrivate(mods)
|
||||
|| ! Modifier.isPublic(mods) && ! inSamePackage(c, from)))
|
||||
continue;
|
||||
|
||||
AccessController.doPrivileged(new SetAccessibleAction(res));
|
||||
return res;
|
||||
|
||||
if (c == from
|
||||
|| Modifier.isProtected(mods)
|
||||
|| Modifier.isPublic(mods)
|
||||
|| (! Modifier.isPrivate(mods) && inSamePackage(c, from)))
|
||||
{
|
||||
AccessController.doPrivileged(new SetAccessibleAction(res));
|
||||
return res;
|
||||
}
|
||||
}
|
||||
catch (NoSuchMethodException e)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue