[jboss-svn-commits] JBL Code SVN: r9106 - labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/utils.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Jan 29 18:46:17 EST 2007
Author: mark.little at jboss.com
Date: 2007-01-29 18:46:17 -0500 (Mon, 29 Jan 2007)
New Revision: 9106
Modified:
labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/utils/DocComparitor.java
Log:
Changed InvalidArgumentException to IllegalParameterException
Modified: labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/utils/DocComparitor.java
===================================================================
--- labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/utils/DocComparitor.java 2007-01-29 23:44:37 UTC (rev 9105)
+++ labs/jbosstm/trunk/XTS/WSCF/classes/com/arjuna/mwlabs/wscf/utils/DocComparitor.java 2007-01-29 23:46:17 UTC (rev 9106)
@@ -35,16 +35,13 @@
import com.arjuna.mw.wscf.utils.CoordinationXML;
-import java.security.InvalidParameterException;
-
/**
- * The DocComparitor takes two XML documents describing a coordinator's
- * protocol and tests for equality. Two documents are equal if the have
- * exactly the same elements and attributes, no matter what the order of
- * occurrence.
- *
+ * The DocComparitor takes two XML documents describing a coordinator's protocol
+ * and tests for equality. Two documents are equal if the have exactly the same
+ * elements and attributes, no matter what the order of occurrence.
+ *
* The comapritor may be extended to allow subset or superset comparisons.
- *
+ *
* @author Mark Little (mark.little at arjuna.com)
* @version $Id: DocComparitor.java,v 1.4 2005/05/19 12:13:39 nmcl Exp $
* @since 1.0.
@@ -53,31 +50,37 @@
public class DocComparitor
{
- public DocComparitor ()
- {
- }
+ public DocComparitor ()
+ {
+ }
- /**
- * Are the two documents equal? We assume that the protocol names are
- * unique, so can check for equality simply on that. If we want to check
- * individual elements and attributes then we could.
- *
- * @message com.arjuna.mwlabs.wscf.utils.DocComparitor_1 [com.arjuna.mwlabs.wscf.utils.DocComparitor_1] - First parameter is null!
- * @message com.arjuna.mwlabs.wscf.utils.DocComparitor_2 [com.arjuna.mwlabs.wscf.utils.DocComparitor_2] - Second parameter is null!
- */
+ /**
+ * Are the two documents equal? We assume that the protocol names are
+ * unique, so can check for equality simply on that. If we want to check
+ * individual elements and attributes then we could.
+ *
+ * @message com.arjuna.mwlabs.wscf.utils.DocComparitor_1
+ * [com.arjuna.mwlabs.wscf.utils.DocComparitor_1] - First parameter
+ * is null!
+ * @message com.arjuna.mwlabs.wscf.utils.DocComparitor_2
+ * [com.arjuna.mwlabs.wscf.utils.DocComparitor_2] - Second
+ * parameter is null!
+ */
- public boolean equals (org.w3c.dom.Document doc1, org.w3c.dom.Document doc2) throws InvalidParameterException
- {
- if (doc1 == null)
- throw new InvalidParameterException(wscfLogger.log_mesg.getString("com.arjuna.mwlabs.wscf.utils.DocComparitor_1"));
-
- if (doc2 == null)
- throw new InvalidParameterException(wscfLogger.log_mesg.getString("com.arjuna.mwlabs.wscf.utils.DocComparitor_2"));
+ public boolean equals (org.w3c.dom.Document doc1, org.w3c.dom.Document doc2)
+ {
+ if (doc1 == null)
+ throw new IllegalArgumentException(wscfLogger.log_mesg
+ .getString("com.arjuna.mwlabs.wscf.utils.DocComparitor_1"));
- CoordinationXML protocol1 = new CoordinationXML(doc1);
- CoordinationXML protocol2 = new CoordinationXML(doc2);
-
- return protocol1.equals(protocol2);
- }
+ if (doc2 == null)
+ throw new IllegalArgumentException(wscfLogger.log_mesg
+ .getString("com.arjuna.mwlabs.wscf.utils.DocComparitor_2"));
+ CoordinationXML protocol1 = new CoordinationXML(doc1);
+ CoordinationXML protocol2 = new CoordinationXML(doc2);
+
+ return protocol1.equals(protocol2);
+ }
+
}
More information about the jboss-svn-commits
mailing list