mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
8345565
: Remove remaining SecurityManager motivated APIs from sun.reflect.util
Reviewed-by: mullan, rriggs, liach
This commit is contained in:
parent
97b8a09bda
commit
691e692149
10 changed files with 7 additions and 258 deletions
|
@ -35,7 +35,6 @@ import java.util.StringJoiner;
|
|||
import jdk.internal.util.ByteArray;
|
||||
import jdk.internal.access.JavaLangAccess;
|
||||
import jdk.internal.access.SharedSecrets;
|
||||
import sun.reflect.misc.ReflectUtil;
|
||||
|
||||
import static jdk.internal.util.ModifiedUtf.putChar;
|
||||
import static jdk.internal.util.ModifiedUtf.utfLen;
|
||||
|
@ -1170,12 +1169,6 @@ public class ObjectOutputStream
|
|||
}
|
||||
}
|
||||
|
||||
private boolean isCustomSubclass() {
|
||||
// Return true if this class is a custom subclass of ObjectOutputStream
|
||||
return getClass().getClassLoader()
|
||||
!= ObjectOutputStream.class.getClassLoader();
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes class descriptor representing a dynamic proxy class to stream.
|
||||
*/
|
||||
|
@ -1193,9 +1186,6 @@ public class ObjectOutputStream
|
|||
}
|
||||
|
||||
bout.setBlockDataMode(true);
|
||||
if (isCustomSubclass()) {
|
||||
ReflectUtil.checkPackageAccess(cl);
|
||||
}
|
||||
annotateProxyClass(cl);
|
||||
bout.setBlockDataMode(false);
|
||||
bout.writeByte(TC_ENDBLOCKDATA);
|
||||
|
@ -1222,9 +1212,6 @@ public class ObjectOutputStream
|
|||
|
||||
Class<?> cl = desc.forClass();
|
||||
bout.setBlockDataMode(true);
|
||||
if (cl != null && isCustomSubclass()) {
|
||||
ReflectUtil.checkPackageAccess(cl);
|
||||
}
|
||||
annotateClass(cl);
|
||||
bout.setBlockDataMode(false);
|
||||
bout.writeByte(TC_ENDBLOCKDATA);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue