提交 6285eefd 编写于 作者: X xuelei

6546671: (spec)javax.net.ssl.TrustManagerFactory.getInstance() throws undocumented NP

5053895: (spec) Unspecified IllegalStateException in TrustManagerFactory
Summary: add NullPointerException/IllegalStateException description
Reviewed-by: weijun
上级 3040e387
/* /*
* Copyright 1999-2006 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -129,6 +129,7 @@ public class TrustManagerFactory { ...@@ -129,6 +129,7 @@ public class TrustManagerFactory {
* @exception NoSuchAlgorithmException if no Provider supports a * @exception NoSuchAlgorithmException if no Provider supports a
* TrustManagerFactorySpi implementation for the * TrustManagerFactorySpi implementation for the
* specified algorithm. * specified algorithm.
* @exception NullPointerException if algorithm is null.
* *
* @see java.security.Provider * @see java.security.Provider
*/ */
...@@ -171,6 +172,7 @@ public class TrustManagerFactory { ...@@ -171,6 +172,7 @@ public class TrustManagerFactory {
* registered in the security provider list. * registered in the security provider list.
* *
* @throws IllegalArgumentException if the provider name is null or empty. * @throws IllegalArgumentException if the provider name is null or empty.
* @throws NullPointerException if algorithm is null.
* *
* @see java.security.Provider * @see java.security.Provider
*/ */
...@@ -208,6 +210,7 @@ public class TrustManagerFactory { ...@@ -208,6 +210,7 @@ public class TrustManagerFactory {
* from the specified Provider object. * from the specified Provider object.
* *
* @throws IllegalArgumentException if the provider is null. * @throws IllegalArgumentException if the provider is null.
* @throws NullPointerException if algorithm is null.
* *
* @see java.security.Provider * @see java.security.Provider
*/ */
...@@ -274,6 +277,8 @@ public class TrustManagerFactory { ...@@ -274,6 +277,8 @@ public class TrustManagerFactory {
/** /**
* Returns one trust manager for each type of trust material. * Returns one trust manager for each type of trust material.
* *
* @throws IllegalStateException if the factory is not initialized.
*
* @return the trust managers * @return the trust managers
*/ */
public final TrustManager[] getTrustManagers() { public final TrustManager[] getTrustManagers() {
......
/* /*
* Copyright 1999-2001 Sun Microsystems, Inc. All Rights Reserved. * Copyright 1999-2008 Sun Microsystems, Inc. All Rights Reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
* *
* This code is free software; you can redistribute it and/or modify it * This code is free software; you can redistribute it and/or modify it
...@@ -74,6 +74,8 @@ public abstract class TrustManagerFactorySpi { ...@@ -74,6 +74,8 @@ public abstract class TrustManagerFactorySpi {
/** /**
* Returns one trust manager for each type of trust material. * Returns one trust manager for each type of trust material.
* *
* @throws IllegalStateException if the factory is not initialized.
*
* @return the trust managers * @return the trust managers
*/ */
protected abstract TrustManager[] engineGetTrustManagers(); protected abstract TrustManager[] engineGetTrustManagers();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册