Hi Sean,

On 1/30/2018 10:03 AM, Sean Mullan wrote:
Does Runtime.version().feature() return the same value as the "java.specification.version" property? (see sun.security.util.SecurityConstants.PROVIDER_VER).

That is the value that the JDK security providers use as their version. If not, this test may fail when we bump up the version to 11 and we probably would want to also set SecurityConstants.PROVIDER_VER to the value of Runtime.version().feature() instead (you could include that as part of this fix).


The following patch based on java.specification.version

@@ -42,7 +42,8 @@

         for (Provider p: Security.getProviders()) {
             System.out.print(p.getName() + " ");
-            if (p.getVersion() != 10.0d) {
+            String specVersion = System.getProperty("java.specification.version");
+            if (p.getVersion() != Double.parseDouble(specVersion)) {
                 System.out.println("failed. " + "Version received was " +
                         p.getVersion());
                 failure = true;

passes both on JDK 10 builds and an internal JDK 11 build with the version updated.

Thanks,

-Joe

Reply via email to