< prev index next >
src/java.base/share/classes/javax/security/auth/login/Configuration.java
Print this page
rev 15967 : [mq]: GetInstance
*** 327,357 ****
* Java Cryptography Architecture Standard Algorithm Name
* Documentation</a> for a list of standard Configuration types.
*
* @param params parameters for the Configuration, which may be null.
*
! * @return the new Configuration object.
*
! * @exception SecurityException if the caller does not have permission
! * to get a Configuration instance for the specified type.
*
! * @exception NullPointerException if the specified type is null.
*
! * @exception IllegalArgumentException if the specified parameters
! * are not understood by the ConfigurationSpi implementation
! * from the selected Provider.
*
! * @exception NoSuchAlgorithmException if no Provider supports a
! * ConfigurationSpi implementation for the specified type.
*
* @see Provider
* @since 1.6
*/
public static Configuration getInstance(String type,
Configuration.Parameters params)
throws NoSuchAlgorithmException {
checkPermission(type);
try {
GetInstance.Instance instance = GetInstance.getInstance
("Configuration",
ConfigurationSpi.class,
--- 327,359 ----
* Java Cryptography Architecture Standard Algorithm Name
* Documentation</a> for a list of standard Configuration types.
*
* @param params parameters for the Configuration, which may be null.
*
! * @return the new {@code Configuration} object
*
! * @throws IllegalArgumentException if the specified parameters
! * are not understood by the {@code ConfigurationSpi}
! * implementation from the selected {@code Provider}
*
! * @throws NoSuchAlgorithmException if no {@code Provider} supports a
! * {@code ConfigurationSpi} implementation for the specified type
*
! * @throws NullPointerException if {@code type} is {@code null}
*
! * @throws SecurityException if the caller does not have permission
! * to get a {@code Configuration} instance for the specified type
*
* @see Provider
+ *
* @since 1.6
*/
public static Configuration getInstance(String type,
Configuration.Parameters params)
throws NoSuchAlgorithmException {
+ Objects.requireNonNull(type, "null type name");
checkPermission(type);
try {
GetInstance.Instance instance = GetInstance.getInstance
("Configuration",
ConfigurationSpi.class,
*** 385,421 ****
*
* @param params parameters for the Configuration, which may be null.
*
* @param provider the provider.
*
! * @return the new Configuration object.
*
! * @exception SecurityException if the caller does not have permission
! * to get a Configuration instance for the specified type.
*
! * @exception NullPointerException if the specified type is null.
*
! * @exception IllegalArgumentException if the specified provider
! * is null or empty,
! * or if the specified parameters are not understood by
! * the ConfigurationSpi implementation from the specified provider.
*
! * @exception NoSuchProviderException if the specified provider is not
! * registered in the security provider list.
*
! * @exception NoSuchAlgorithmException if the specified provider does not
! * support a ConfigurationSpi implementation for the specified
! * type.
*
* @see Provider
* @since 1.6
*/
public static Configuration getInstance(String type,
Configuration.Parameters params,
String provider)
throws NoSuchProviderException, NoSuchAlgorithmException {
if (provider == null || provider.length() == 0) {
throw new IllegalArgumentException("missing provider");
}
checkPermission(type);
--- 387,424 ----
*
* @param params parameters for the Configuration, which may be null.
*
* @param provider the provider.
*
! * @return the new {@code Configuration} object
*
! * @throws IllegalArgumentException if the specified provider
! * is {@code null} or empty, or if the specified parameters
! * are not understood by the {@code ConfigurationSpi}
! * implementation from the specified provider
*
! * @throws NoSuchProviderException if the specified provider is not
! * registered in the security provider list
*
! * @throws NoSuchAlgorithmException if the specified provider does not
! * support a {@code ConfigurationSpi} implementation for the
! * specified type
*
! * @throws NullPointerException if {@code type} is {@code null}
*
! * @throws SecurityException if the caller does not have permission
! * to get a {@code Configuration} instance for the specified type
*
* @see Provider
* @since 1.6
*/
public static Configuration getInstance(String type,
Configuration.Parameters params,
String provider)
throws NoSuchProviderException, NoSuchAlgorithmException {
+ Objects.requireNonNull(type, "null type name");
if (provider == null || provider.length() == 0) {
throw new IllegalArgumentException("missing provider");
}
checkPermission(type);
*** 451,483 ****
*
* @param params parameters for the Configuration, which may be null.
*
* @param provider the Provider.
*
! * @return the new Configuration object.
*
! * @exception SecurityException if the caller does not have permission
! * to get a Configuration instance for the specified type.
*
! * @exception NullPointerException if the specified type is null.
*
! * @exception IllegalArgumentException if the specified Provider is null,
! * or if the specified parameters are not understood by
! * the ConfigurationSpi implementation from the specified Provider.
*
! * @exception NoSuchAlgorithmException if the specified Provider does not
! * support a ConfigurationSpi implementation for the specified
! * type.
*
* @see Provider
* @since 1.6
*/
public static Configuration getInstance(String type,
Configuration.Parameters params,
Provider provider)
throws NoSuchAlgorithmException {
if (provider == null) {
throw new IllegalArgumentException("missing provider");
}
checkPermission(type);
--- 454,488 ----
*
* @param params parameters for the Configuration, which may be null.
*
* @param provider the Provider.
*
! * @return the new {@code Configuration} object
*
! * @throws IllegalArgumentException if the specified {@code Provider}
! * is {@code null}, or if the specified parameters are not
! * understood by the {@code ConfigurationSpi} implementation
! * from the specified Provider
*
! * @throws NoSuchAlgorithmException if the specified {@code Provider}
! * does not support a {@code ConfigurationSpi} implementation
! * for the specified type
*
! * @throws NullPointerException if {@code type} is {@code null}
*
! * @throws SecurityException if the caller does not have permission
! * to get a {@code Configuration} instance for the specified type
*
* @see Provider
* @since 1.6
*/
public static Configuration getInstance(String type,
Configuration.Parameters params,
Provider provider)
throws NoSuchAlgorithmException {
+ Objects.requireNonNull(type, "null type name");
if (provider == null) {
throw new IllegalArgumentException("missing provider");
}
checkPermission(type);
< prev index next >