Author: geirm Date: Fri Feb 11 06:17:52 2005 New Revision: 153401 URL: http://svn.apache.org/viewcvs?view=rev&rev=153401 Log: Fix it here, fix it there, let me fix it everywhere!
Modified: geronimo/trunk/specs/jaxr/src/java/javax/xml/registry/JAXRException.java Modified: geronimo/trunk/specs/jaxr/src/java/javax/xml/registry/JAXRException.java URL: http://svn.apache.org/viewcvs/geronimo/trunk/specs/jaxr/src/java/javax/xml/registry/JAXRException.java?view=diff&r1=153400&r2=153401 ============================================================================== --- geronimo/trunk/specs/jaxr/src/java/javax/xml/registry/JAXRException.java (original) +++ geronimo/trunk/specs/jaxr/src/java/javax/xml/registry/JAXRException.java Fri Feb 11 06:17:52 2005 @@ -49,10 +49,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; }