提交 7b51e1d8 编写于 作者: I igerasim

8205491: adjust reflective access checks

Reviewed-by: alanb, mchung, igerasim, rhalade, ahgross
上级 62b4085a
......@@ -1534,11 +1534,11 @@ public class ObjectStreamClass implements Serializable {
}
return false;
} else {
// accessible if the parent is public and any constructor
// is protected or public
if ((superCl.getModifiers() & Modifier.PUBLIC) == 0) {
// sanity check to ensure the parent is protected or public
if ((superCl.getModifiers() & (Modifier.PROTECTED | Modifier.PUBLIC)) == 0) {
return false;
}
// accessible if any constructor is protected or public
for (Constructor<?> ctor : superCl.getDeclaredConstructors()) {
if ((ctor.getModifiers() & (Modifier.PROTECTED | Modifier.PUBLIC)) != 0) {
return true;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册