< prev index next >

src/share/classes/java/security/Security.java

Print this page
rev 1387 : 7064075: Security libraries don't build with javac -Xlint:all,-deprecation -Werror
Reviewed-by: xuelei, mullan
Contributed-by: alexandre.boulgakov@oracle.com

*** 31,42 **** import java.io.*; import java.net.URL; import sun.security.util.Debug; import sun.security.util.PropertyExpander; - import java.security.Provider.Service; - import sun.security.jca.*; /** * <p>This class centralizes all security properties and common security * methods. One of its primary uses is to manage providers. --- 31,40 ----
*** 658,677 **** return result; } // Map containing cached Spi Class objects of the specified type ! private static final Map<String,Class> spiMap = ! new ConcurrentHashMap<String,Class>(); /** * Return the Class object for the given engine type * (e.g. "MessageDigest"). Works for Spis in the java.security package * only. */ ! private static Class getSpiClass(String type) { ! Class clazz = spiMap.get(type); if (clazz != null) { return clazz; } try { clazz = Class.forName("java.security." + type + "Spi"); --- 656,675 ---- return result; } // Map containing cached Spi Class objects of the specified type ! private static final Map<String, Class<?>> spiMap = ! new ConcurrentHashMap<String,Class<?>>(); /** * Return the Class object for the given engine type * (e.g. "MessageDigest"). Works for Spis in the java.security package * only. */ ! private static Class<?> getSpiClass(String type) { ! Class<?> clazz = spiMap.get(type); if (clazz != null) { return clazz; } try { clazz = Class.forName("java.security." + type + "Spi");
*** 1077,1087 **** **/ public static Set<String> getAlgorithms(String serviceName) { if ((serviceName == null) || (serviceName.length() == 0) || (serviceName.endsWith("."))) { ! return Collections.EMPTY_SET; } HashSet<String> result = new HashSet<String>(); Provider[] providers = Security.getProviders(); --- 1075,1085 ---- **/ public static Set<String> getAlgorithms(String serviceName) { if ((serviceName == null) || (serviceName.length() == 0) || (serviceName.endsWith("."))) { ! return Collections.emptySet(); } HashSet<String> result = new HashSet<String>(); Provider[] providers = Security.getProviders();
< prev index next >