[jboss-svn-commits] JBL Code SVN: r9096 - labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mw/wscf/protocols.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Jan 29 18:33:59 EST 2007


Author: mark.little at jboss.com
Date: 2007-01-29 18:33:58 -0500 (Mon, 29 Jan 2007)
New Revision: 9096

Modified:
   labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManager.java
Log:
Changed InvalidArgumentException to IllegalParameterException

Modified: labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManager.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManager.java	2007-01-29 23:30:30 UTC (rev 9095)
+++ labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mw/wscf/protocols/ProtocolManager.java	2007-01-29 23:33:58 UTC (rev 9096)
@@ -49,7 +49,6 @@
 import com.arjuna.mw.wscf.exceptions.ProtocolNotRegisteredException;
 import com.arjuna.mw.wscf.exceptions.UnknownProtocolImplementationException;
 
-import java.security.InvalidParameterException;
 import java.lang.ExceptionInInitializerError;
 
 import java.util.Vector;
@@ -82,16 +81,16 @@
 	 * @exception ProtocolAlreadyRegisteredException
 	 *                Thrown if the exact same protocol definition has already
 	 *                been registered.
-	 * @exception InvalidParameterException
+	 * @exception IllegalArgumentException
 	 *                Thrown if either of the parameters is invalid.
 	 */
 
 	public void addProtocol (org.w3c.dom.Document protocol, Object className)
 			throws ProtocolAlreadyRegisteredException,
-			InvalidParameterException
+			IllegalArgumentException
 	{
 		if ((protocol == null) || (className == null))
-			throw new InvalidParameterException();
+			throw new IllegalArgumentException();
 
 		if (present(protocol))
 			throw new ProtocolAlreadyRegisteredException();
@@ -123,12 +122,12 @@
 	 * @exception ProtocolNotRegisteredException
 	 *                Thrown if the protocol to be removed has not been
 	 *                registered.
-	 * @exception InvalidParameterException
+	 * @exception IllegalArgumentException
 	 *                Thrown if either of the parameters is invalid.
 	 */
 
 	public void replaceProtocol (org.w3c.dom.Document protocol, Object className)
-			throws ProtocolNotRegisteredException, InvalidParameterException
+			throws ProtocolNotRegisteredException, IllegalArgumentException
 	{
 		synchronized (this)
 		{
@@ -154,7 +153,7 @@
 						}
 						catch (Exception ex)
 						{
-							throw new InvalidParameterException(ex.toString());
+							throw new IllegalArgumentException(ex.toString());
 						}
 
 						found = true;
@@ -174,7 +173,7 @@
 	 * @exception ProtocolNotRegisteredException
 	 *                Thrown if the requested coordination protocol has not been
 	 *                registered.
-	 * @exception InvalidParameterException
+	 * @exception IllegalArgumentException
 	 *                Thrown if the parameter is invalid.
 	 * 
 	 * @return The class that implements the specified coordination protocol.
@@ -185,7 +184,7 @@
 	 */
 
 	public Object getProtocolImplementation (org.w3c.dom.Document protocol)
-			throws ProtocolNotRegisteredException, InvalidParameterException
+			throws ProtocolNotRegisteredException, IllegalArgumentException
 	{
 		/*
 		 * Only checks the coordination-type via the hashtable. Now we need to
@@ -229,7 +228,7 @@
 	 */
 
 	public Object removeProtocol (org.w3c.dom.Document protocol)
-			throws ProtocolNotRegisteredException, InvalidParameterException
+			throws ProtocolNotRegisteredException, IllegalArgumentException
 	{
 		CoordinationXML protocolDef = new CoordinationXML(protocol);
 		Vector impls = (Vector) _protocols.get(protocolDef.protocolType());
@@ -266,7 +265,7 @@
 	 * @exception UnknownProtocolImplementationException
 	 *                Thrown if the specified implementation class has not been
 	 *                registered.
-	 * @exception InvalidParameterException
+	 * @exception IllegalArgumentException
 	 *                Thrown if the parameter is invalid.
 	 * 
 	 * @return the protocol implementation removed.
@@ -274,7 +273,7 @@
 
 	public Object removeProtocolImplementation (Object className)
 			throws UnknownProtocolImplementationException,
-			InvalidParameterException
+			IllegalArgumentException
 	{
 		throw new UnknownProtocolImplementationException();
 	}
@@ -286,7 +285,7 @@
 	 * @param org.w3c.dom.Document
 	 *            protocol The XML definition of the coordination protocol.
 	 * 
-	 * @exception InvalidParameterException
+	 * @exception IllegalArgumentException
 	 *                Thrown if the parameter is invalid (e.g., null).
 	 * 
 	 * @return <code>true</code> if there is an exact match for the specified
@@ -294,7 +293,7 @@
 	 */
 
 	public final boolean present (org.w3c.dom.Document protocol)
-			throws InvalidParameterException
+			throws IllegalArgumentException
 	{
 		/*
 		 * Only checks the coordination-type via the hashtable. Now we need to
@@ -326,7 +325,7 @@
 	 * @param org.w3c.dom.Document
 	 *            protocol The XML definition of the coordination protocol.
 	 * 
-	 * @exception InvalidParameterException
+	 * @exception IllegalArgumentException
 	 *                Thrown if the parameter is invalid (e.g., null).
 	 * 
 	 * @return <code>true</code> if there is at match for the specified
@@ -334,7 +333,7 @@
 	 */
 
 	public final boolean presentWithDifferentName (org.w3c.dom.Document protocol)
-			throws InvalidParameterException
+			throws IllegalArgumentException
 	{
 		/*
 		 * Check the registered protocols and if the types are the same but




More information about the jboss-svn-commits mailing list