Java 类sun.security.x509.PolicyMappingsExtension 实例源码

项目:openjdk-jdk10    文件:DefaultCriticality.java   
public static void main(String [] args) throws Exception {
    PolicyConstraintsExtension pce = new PolicyConstraintsExtension(-1,-1);
    if (!pce.isCritical()) {
        throw new Exception("PolicyConstraintsExtension should be " +
                            "critical by default");
    }

    PolicyMappingsExtension pme = new PolicyMappingsExtension();
    if (!pme.isCritical()) {
        throw new Exception("PolicyMappingsExtension should be " +
                            "critical by default");
    }

    System.out.println("Test passed.");
}
项目:openjdk9    文件:DefaultCriticality.java   
public static void main(String [] args) throws Exception {
    PolicyConstraintsExtension pce = new PolicyConstraintsExtension(-1,-1);
    if (!pce.isCritical()) {
        throw new Exception("PolicyConstraintsExtension should be " +
                            "critical by default");
    }

    PolicyMappingsExtension pme = new PolicyMappingsExtension();
    if (!pme.isCritical()) {
        throw new Exception("PolicyMappingsExtension should be " +
                            "critical by default");
    }

    System.out.println("Test passed.");
}