jdk/test/java/security/Provider/ProviderVersionCheck.java
changeset 22121 b1aa108cccb5
parent 20485 8af87f3d549c
child 33991 619bfc4d582d
equal deleted inserted replaced
22120:3ec2fa1035de 22121:b1aa108cccb5
     1 /*
     1 /*
     2  * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
    25 import java.security.Security;
    25 import java.security.Security;
    26 import java.lang.Exception;
    26 import java.lang.Exception;
    27 
    27 
    28 /*
    28 /*
    29  * @test
    29  * @test
    30  * @bug 7122707
    30  * @bug 8030823
    31  * @run main/othervm ProviderVersionCheck
    31  * @run main/othervm ProviderVersionCheck
    32  * @summary Verify all providers in the default Providers list have the proper
    32  * @summary Verify all providers in the default Providers list have the proper
    33  * version for the release
    33  * version for the release
    34  * @author Anthony Scarpino
    34  * @author Anthony Scarpino
    35  */
    35  */
    40 
    40 
    41         boolean failure = false;
    41         boolean failure = false;
    42 
    42 
    43         for (Provider p: Security.getProviders()) {
    43         for (Provider p: Security.getProviders()) {
    44             System.out.print(p.getName() + " ");
    44             System.out.print(p.getName() + " ");
    45             if (p.getVersion() != 1.8d) {
    45             if (p.getVersion() != 1.9d) {
    46                 System.out.println("failed. " + "Version received was " +
    46                 System.out.println("failed. " + "Version received was " +
    47                         p.getVersion());
    47                         p.getVersion());
    48                 failure = true;
    48                 failure = true;
    49             } else {
    49             } else {
    50                 System.out.println("passed.");
    50                 System.out.println("passed.");