< prev index next >
src/java.base/share/classes/javax/security/auth/login/Configuration.java
Print this page
rev 15967 : [mq]: GetInstance
@@ -327,31 +327,33 @@
* 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.
+ * @return the new {@code Configuration} object
*
- * @exception SecurityException if the caller does not have permission
- * to get a Configuration instance for the specified type.
+ * @throws IllegalArgumentException if the specified parameters
+ * are not understood by the {@code ConfigurationSpi}
+ * implementation from the selected {@code Provider}
*
- * @exception NullPointerException if the specified type is null.
+ * @throws NoSuchAlgorithmException if no {@code Provider} supports a
+ * {@code ConfigurationSpi} implementation for the specified type
*
- * @exception IllegalArgumentException if the specified parameters
- * are not understood by the ConfigurationSpi implementation
- * from the selected Provider.
+ * @throws NullPointerException if {@code type} is {@code null}
*
- * @exception NoSuchAlgorithmException if no Provider supports a
- * ConfigurationSpi implementation for the specified type.
+ * @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,37 +387,38 @@
*
* @param params parameters for the Configuration, which may be null.
*
* @param provider the provider.
*
- * @return the new Configuration object.
+ * @return the new {@code Configuration} object
*
- * @exception SecurityException if the caller does not have permission
- * to get a Configuration instance for the specified type.
+ * @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
*
- * @exception NullPointerException if the specified type is null.
+ * @throws NoSuchProviderException if the specified provider is not
+ * registered in the security provider list
*
- * @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.
+ * @throws NoSuchAlgorithmException if the specified provider does not
+ * support a {@code ConfigurationSpi} implementation for the
+ * specified type
*
- * @exception NoSuchProviderException if the specified provider is not
- * registered in the security provider list.
+ * @throws NullPointerException if {@code type} is {@code null}
*
- * @exception NoSuchAlgorithmException if the specified provider does not
- * support a ConfigurationSpi implementation for the specified
- * type.
+ * @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,33 +454,35 @@
*
* @param params parameters for the Configuration, which may be null.
*
* @param provider the Provider.
*
- * @return the new Configuration object.
+ * @return the new {@code Configuration} object
*
- * @exception SecurityException if the caller does not have permission
- * to get a Configuration instance for the specified type.
+ * @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
*
- * @exception NullPointerException if the specified type is null.
+ * @throws NoSuchAlgorithmException if the specified {@code Provider}
+ * does not support a {@code ConfigurationSpi} implementation
+ * for the specified type
*
- * @exception IllegalArgumentException if the specified Provider is null,
- * or if the specified parameters are not understood by
- * the ConfigurationSpi implementation from the specified Provider.
+ * @throws NullPointerException if {@code type} is {@code null}
*
- * @exception NoSuchAlgorithmException if the specified Provider does not
- * support a ConfigurationSpi implementation for the specified
- * type.
+ * @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 >