JDK-4847777 : (spec) clarify that RemoteException constructors call initCause
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.rmi
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: solaris_7,solaris_9
  • CPU: generic,sparc
  • Submitted: 2003-04-14
  • Updated: 2017-05-16
  • Resolved: 2003-08-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availabitlity Release.

To download the current JDK release, click here.
Other
5.0 tigerFixed
Related Reports
Duplicate :  
Description
The following code causes an java.lang.IllegalStateException, but according to the documentation should not throw this.

Test() throws MarshalException{
		try { 
			throw new MarshalException(mystring);
		}
		catch(Exception e) {
			MarshalException me = new MarshalException("Scooby");
			me.initCause(e);
			throw me;
		}
	}

	public static void main(String args[]) throws MarshalException{ 
		new Test();
	}
}

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: tiger FIXED IN: tiger INTEGRATED IN: tiger tiger-b15
2004-06-14

EVALUATION What package is MarshalException in? I don't see that class in any of the jdk packages. -- iag@sfbay 2003-04-14 The spec should be more clear about this issue. All RemoteException constructors call the initCause method to prevent subsequent invocations of initCause. RemoteException has a public field "detail" that contains the cause. If initCause was allowed to be called, then it is possible for the detail field to be set separately causing different values for the "detail" cause held by RemoteException and the cause held by the superclass Throwable. To prevent this inconsistency from occuring, the initCause method cannot be called on a RemoteException instance. This fact should be clearly spelled out in the documentation for RemoteException. ###@###.### 2003-04-14
2003-04-14