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:
committed by
Andrew Haley
parent
55f9959db8
commit
089aaefeba
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user