下面列出了java.net.NetPermission#java.io.SerializablePermission 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}
private static void isCustomSerializationPermitted() {
SecurityManager sm = System.getSecurityManager();
if (!allowCustomValueHandler) {
if ( sm != null) {
// check that a serialization permission has been
// set to allow the loading of the Util delegate
// which provides access to custom ValueHandler
sm.checkPermission(new SerializablePermission(
"enableCustomValueHandler"));
}
}
}
/**
* Set the process-wide filter if it has not already been configured or set.
*
* @param filter the serialization filter to set as the process-wide filter; not null
* @throws SecurityException if there is security manager and the
* {@code SerializablePermission("serialFilter")} is not granted
* @throws IllegalStateException if the filter has already been set {@code non-null}
*/
public static void setSerialFilter(ObjectInputFilter filter) {
Objects.requireNonNull(filter, "filter");
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission("serialFilter"));
}
synchronized (serialFilterLock) {
if (serialFilter != null) {
throw new IllegalStateException("Serial filter can only be set once");
}
serialFilter = filter;
}
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}
private static void isCustomSerializationPermitted() {
SecurityManager sm = System.getSecurityManager();
if (!allowCustomValueHandler) {
if ( sm != null) {
// check that a serialization permission has been
// set to allow the loading of the Util delegate
// which provides access to custom ValueHandler
sm.checkPermission(new SerializablePermission(
"enableCustomValueHandler"));
}
}
}
/**
* Set the process-wide filter if it has not already been configured or set.
*
* @param filter the serialization filter to set as the process-wide filter; not null
* @throws SecurityException if there is security manager and the
* {@code SerializablePermission("serialFilter")} is not granted
* @throws IllegalStateException if the filter has already been set {@code non-null}
*/
public static void setSerialFilter(ObjectInputFilter filter) {
Objects.requireNonNull(filter, "filter");
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission("serialFilter"));
}
synchronized (serialFilterLock) {
if (serialFilter != null) {
throw new IllegalStateException("Serial filter can only be set once");
}
serialFilter = filter;
}
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}
private static void isCustomSerializationPermitted() {
SecurityManager sm = System.getSecurityManager();
if (!allowCustomValueHandler) {
if ( sm != null) {
// check that a serialization permission has been
// set to allow the loading of the Util delegate
// which provides access to custom ValueHandler
sm.checkPermission(new SerializablePermission(
"enableCustomValueHandler"));
}
}
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}
private static void isCustomSerializationPermitted() {
SecurityManager sm = System.getSecurityManager();
if (!allowCustomValueHandler) {
if ( sm != null) {
// check that a serialization permission has been
// set to allow the loading of the Util delegate
// which provides access to custom ValueHandler
sm.checkPermission(new SerializablePermission(
"enableCustomValueHandler"));
}
}
}
/**
* Set the process-wide filter if it has not already been configured or set.
*
* @param filter the serialization filter to set as the process-wide filter; not null
* @throws SecurityException if there is security manager and the
* {@code SerializablePermission("serialFilter")} is not granted
* @throws IllegalStateException if the filter has already been set {@code non-null}
*/
public static void setSerialFilter(ObjectInputFilter filter) {
Objects.requireNonNull(filter, "filter");
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission("serialFilter"));
}
synchronized (serialFilterLock) {
if (serialFilter != null) {
throw new IllegalStateException("Serial filter can only be set once");
}
serialFilter = filter;
}
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}
private static void isCustomSerializationPermitted() {
SecurityManager sm = System.getSecurityManager();
if (!allowCustomValueHandler) {
if ( sm != null) {
// check that a serialization permission has been
// set to allow the loading of the Util delegate
// which provides access to custom ValueHandler
sm.checkPermission(new SerializablePermission(
"enableCustomValueHandler"));
}
}
}
/**
* Set the process-wide filter if it has not already been configured or set.
*
* @param filter the serialization filter to set as the process-wide filter; not null
* @throws SecurityException if there is security manager and the
* {@code SerializablePermission("serialFilter")} is not granted
* @throws IllegalStateException if the filter has already been set {@code non-null}
*/
public static void setSerialFilter(ObjectInputFilter filter) {
Objects.requireNonNull(filter, "filter");
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission("serialFilter"));
}
synchronized (serialFilterLock) {
if (serialFilter != null) {
throw new IllegalStateException("Serial filter can only be set once");
}
serialFilter = filter;
}
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
if (!allowSubclass)
sm.checkPermission(new
SerializablePermission("enableSubclassImplementation"));
}
return null;
}
private static Void checkPermission() {
SecurityManager sm = System.getSecurityManager();
if (sm != null) {
sm.checkPermission(new SerializablePermission(
"enableSubclassImplementation"));
}
return null;
}