java.io.ObjectStreamClass.WeakClassKey Java Examples

The following examples show how to use java.io.ObjectStreamClass.WeakClassKey. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ObjectOutputStream.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #2
Source Project: jdk1.8-source-analysis   Author: raysonfang   File: ObjectInputStream.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #3
Source Project: dragonwell8_jdk   Author: alibaba   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #4
Source Project: dragonwell8_jdk   Author: alibaba   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #5
Source Project: TencentKona-8   Author: Tencent   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #6
Source Project: TencentKona-8   Author: Tencent   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #7
Source Project: jdk8u60   Author: chenghanpeng   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #8
Source Project: jdk8u60   Author: chenghanpeng   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #9
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ObjectOutputStream.java    License: MIT License 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #10
Source Project: JDKSourceCode1.8   Author: wupeixuan   File: ObjectInputStream.java    License: MIT License 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #11
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #12
Source Project: openjdk-jdk8u   Author: AdoptOpenJDK   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #13
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #14
Source Project: openjdk-jdk8u-backup   Author: AdoptOpenJDK   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #15
Source Project: Bytecoder   Author: mirkosertic   File: ObjectOutputStream.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = auditSubclass(cl);
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (!result) {
        sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
    }
}
 
Example #16
Source Project: Bytecoder   Author: mirkosertic   File: ObjectInputStream.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = auditSubclass(cl);
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (!result) {
        sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
    }
}
 
Example #17
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = auditSubclass(cl);
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (!result) {
        sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
    }
}
 
Example #18
Source Project: openjdk-jdk9   Author: AdoptOpenJDK   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = auditSubclass(cl);
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (!result) {
        sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
    }
}
 
Example #19
Source Project: jdk8u-jdk   Author: lambdalab-mirror   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #20
Source Project: jdk8u-jdk   Author: lambdalab-mirror   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #21
Source Project: Java8CN   Author: Java8-CNAPI-Team   File: ObjectOutputStream.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #22
Source Project: Java8CN   Author: Java8-CNAPI-Team   File: ObjectInputStream.java    License: Apache License 2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #23
Source Project: hottub   Author: dsrg-uoft   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #24
Source Project: hottub   Author: dsrg-uoft   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #25
Source Project: openjdk-8-source   Author: keerath   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #26
Source Project: openjdk-8-source   Author: keerath   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #27
Source Project: openjdk-8   Author: bpupadhyaya   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #28
Source Project: openjdk-8   Author: bpupadhyaya   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #29
Source Project: jdk8u_jdk   Author: JetBrains   File: ObjectOutputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectOutputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}
 
Example #30
Source Project: jdk8u_jdk   Author: JetBrains   File: ObjectInputStream.java    License: GNU General Public License v2.0 6 votes vote down vote up
/**
 * Verifies that this (possibly subclass) instance can be constructed
 * without violating security constraints: the subclass must not override
 * security-sensitive non-final methods, or else the
 * "enableSubclassImplementation" SerializablePermission is checked.
 */
private void verifySubclass() {
    Class<?> cl = getClass();
    if (cl == ObjectInputStream.class) {
        return;
    }
    SecurityManager sm = System.getSecurityManager();
    if (sm == null) {
        return;
    }
    processQueue(Caches.subclassAuditsQueue, Caches.subclassAudits);
    WeakClassKey key = new WeakClassKey(cl, Caches.subclassAuditsQueue);
    Boolean result = Caches.subclassAudits.get(key);
    if (result == null) {
        result = Boolean.valueOf(auditSubclass(cl));
        Caches.subclassAudits.putIfAbsent(key, result);
    }
    if (result.booleanValue()) {
        return;
    }
    sm.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
}