equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2013, 2018, 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 8030823 8130696 |
30 * @bug 8030823 8130696 8196414 |
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() != 10.0d) { |
45 String specVersion = System.getProperty("java.specification.version"); |
|
46 if (p.getVersion() != Double.parseDouble(specVersion)) { |
46 System.out.println("failed. " + "Version received was " + |
47 System.out.println("failed. " + "Version received was " + |
47 p.getVersion()); |
48 p.getVersion()); |
48 failure = true; |
49 failure = true; |
49 } else { |
50 } else { |
50 System.out.println("passed."); |
51 System.out.println("passed."); |