# HG changeset patch # User xuelei # Date 1207899798 14400 # Node ID 8fcc864c9258668a812c0964391b260f77998289 # Parent 80bf10b052ee1388965a21c388468d037050cb11 6546671: (spec)javax.net.ssl.TrustManagerFactory.getInstance() throws undocumented NP 5053895: (spec) Unspecified IllegalStateException in TrustManagerFactory Summary: add NullPointerException/IllegalStateException description Reviewed-by: weijun diff -r 80bf10b052ee -r 8fcc864c9258 jdk/src/share/classes/javax/net/ssl/TrustManagerFactory.java --- a/jdk/src/share/classes/javax/net/ssl/TrustManagerFactory.java Fri Apr 11 03:33:22 2008 -0400 +++ b/jdk/src/share/classes/javax/net/ssl/TrustManagerFactory.java Fri Apr 11 03:43:18 2008 -0400 @@ -1,5 +1,5 @@ /* - * 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. * * This code is free software; you can redistribute it and/or modify it @@ -129,6 +129,7 @@ * @exception NoSuchAlgorithmException if no Provider supports a * TrustManagerFactorySpi implementation for the * specified algorithm. + * @exception NullPointerException if algorithm is null. * * @see java.security.Provider */ @@ -171,6 +172,7 @@ * registered in the security provider list. * * @throws IllegalArgumentException if the provider name is null or empty. + * @throws NullPointerException if algorithm is null. * * @see java.security.Provider */ @@ -208,6 +210,7 @@ * from the specified Provider object. * * @throws IllegalArgumentException if the provider is null. + * @throws NullPointerException if algorithm is null. * * @see java.security.Provider */ @@ -274,6 +277,8 @@ /** * Returns one trust manager for each type of trust material. * + * @throws IllegalStateException if the factory is not initialized. + * * @return the trust managers */ public final TrustManager[] getTrustManagers() { diff -r 80bf10b052ee -r 8fcc864c9258 jdk/src/share/classes/javax/net/ssl/TrustManagerFactorySpi.java --- a/jdk/src/share/classes/javax/net/ssl/TrustManagerFactorySpi.java Fri Apr 11 03:33:22 2008 -0400 +++ b/jdk/src/share/classes/javax/net/ssl/TrustManagerFactorySpi.java Fri Apr 11 03:43:18 2008 -0400 @@ -1,5 +1,5 @@ /* - * 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. * * This code is free software; you can redistribute it and/or modify it @@ -74,6 +74,8 @@ /** * Returns one trust manager for each type of trust material. * + * @throws IllegalStateException if the factory is not initialized. + * * @return the trust managers */ protected abstract TrustManager[] engineGetTrustManagers();