JDK 11 RFR of JDK-8196414: Update ProviderVersionCheck.java to pass on updated JDK versions
joe darcy
joe.darcy at oracle.com
Tue Jan 30 17:42:57 UTC 2018
Hello,
The test
java/security/Provider/ProviderVersionCheck.java
has a version-check that is hard coded; therefore, it has to be updated
with each major JDK update. If the test made its check based on the
runtime version, no explicit update would be needed.
Please review the patch below which changes the test as suggested. This
change is part of the set of test updates to support increasing the
version number in JDK 11.
Thanks,
-Joe
diff -r bcce1fa183e7
test/jdk/java/security/Provider/ProviderVersionCheck.java
--- a/test/jdk/java/security/Provider/ProviderVersionCheck.java Mon Jan
29 17:58:12 2018 +0100
+++ b/test/jdk/java/security/Provider/ProviderVersionCheck.java Tue Jan
30 09:39:51 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights
reserved.
+ * Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights
reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -27,7 +27,7 @@
/*
* @test
- * @bug 8030823 8130696
+ * @bug 8030823 8130696 8196414
* @run main/othervm ProviderVersionCheck
* @summary Verify all providers in the default Providers list have
the proper
* version for the release
@@ -42,7 +42,7 @@
for (Provider p: Security.getProviders()) {
System.out.print(p.getName() + " ");
- if (p.getVersion() != 10.0d) {
+ if (p.getVersion() != (double)Runtime.version().feature()) {
System.out.println("failed. " + "Version received was " +
p.getVersion());
failure = true;
More information about the security-dev
mailing list