src/java.base/share/classes/sun/security/jca/ProviderList.java

Print this page
7191662: JCE providers should be located via ServiceLoader

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2015, 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
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -176,13 +176,13 @@
             int k = entry.indexOf(' ');
             ProviderConfig config;
             if (k == -1) {
                 config = new ProviderConfig(entry);
             } else {
-                String className = entry.substring(0, k);
+                String provName = entry.substring(0, k);
                 String argument = entry.substring(k + 1).trim();
-                config = new ProviderConfig(className, argument);
+                config = new ProviderConfig(provName, argument);
             }
 
             // Get rid of duplicate providers.
             if (configList.contains(config) == false) {
                 configList.add(config);

@@ -198,14 +198,14 @@
      * Construct a special ProviderList for JAR verification. It consists
      * of the providers specified via jarClassNames, which must be on the
      * bootclasspath and cannot be in signed JAR files. This is to avoid
      * possible recursion and deadlock during verification.
      */
-    ProviderList getJarList(String[] jarClassNames) {
+    ProviderList getJarList(String[] jarProvNames) {
         List<ProviderConfig> newConfigs = new ArrayList<>();
-        for (String className : jarClassNames) {
-            ProviderConfig newConfig = new ProviderConfig(className);
+        for (String provName : jarProvNames) {
+            ProviderConfig newConfig = new ProviderConfig(provName);
             for (ProviderConfig config : configs) {
                 // if the equivalent object is present in this provider list,
                 // use the old object rather than the new object.
                 // this ensures that when the provider is loaded in the
                 // new thread local list, it will also become available