Author: geirm
Date: Fri Feb 11 06:18:24 2005
New Revision: 153402
URL: http://svn.apache.org/viewcvs?view=rev&rev=153402
Log:
Fix initcause() to be aligned w/ the spec.
Modified:
webservices/scout/trunk/modules/jaxr-api/src/java/javax/xml/registry/JAXRException.java
Modified:
webservices/scout/trunk/modules/jaxr-api/src/java/javax/xml/registry/JAXRException.java
URL:
http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/jaxr-api/src/java/javax/xml/registry/JAXRException.java?view=diff&r1=153401&r2=153402
==============================================================================
---
webservices/scout/trunk/modules/jaxr-api/src/java/javax/xml/registry/JAXRException.java
(original)
+++
webservices/scout/trunk/modules/jaxr-api/src/java/javax/xml/registry/JAXRException.java
Fri Feb 11 06:18:24 2005
@@ -29,7 +29,8 @@
* @version $Revision$ $Date$
*/
public class JAXRException extends Exception implements JAXRResponse {
- protected Throwable cause;
+
+ protected Throwable cause = null;
public JAXRException() {
}
@@ -49,10 +50,11 @@
}
public synchronized Throwable initCause(Throwable cause) {
- if (this.cause != this)
- throw new IllegalStateException("Can't overwrite cause");
- if (cause == this)
- throw new IllegalArgumentException("Self-causation not permitted");
+
+ if (this.cause != null) {
+ throw new IllegalStateException("Cannot overwrite cause");
+ }
+
this.cause = cause;
return this;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]