The UnexpectedException.initCause throws illegal state exception even if
the cause has not yet been set. Tha patch corrects the rmi source code
generator templates to assign the cause to the field .detail instead.
2006-03-29 Audrius Meskauskas <[EMAIL PROTECTED]>
* tools/gnu/classpath/tools/rmi/rmic/templates/Stub_12Method.jav:
Do not use initCause with UnexpectedException.
* tools/gnu/classpath/tools/rmi/rmic/templates/Stub_12MethodVoid.jav:
Likewise.
Index: Stub_12Method.jav
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/rmi/rmic/templates/Stub_12Method.jav,v
retrieving revision 1.1
diff -u -r1.1 Stub_12Method.jav
--- Stub_12Method.jav 9 Feb 2006 20:22:07 -0000 1.1
+++ Stub_12Method.jav 29 Mar 2006 10:24:13 -0000
@@ -19,7 +19,7 @@
catch (Exception e)
{
UnexpectedException uex = new UnexpectedException(exception_message);
- uex.initCause(e);
+ uex.detail = e;
throw uex;
}
}
Index: Stub_12MethodVoid.jav
===================================================================
RCS file: /sources/classpath/classpath/tools/gnu/classpath/tools/rmi/rmic/templates/Stub_12MethodVoid.jav,v
retrieving revision 1.1
diff -u -r1.1 Stub_12MethodVoid.jav
--- Stub_12MethodVoid.jav 9 Feb 2006 20:22:07 -0000 1.1
+++ Stub_12MethodVoid.jav 29 Mar 2006 10:24:13 -0000
@@ -18,7 +18,7 @@
catch (Exception e)
{
UnexpectedException uex = new UnexpectedException(exception_message);
- uex.initCause(e);
+ uex.detail = e;
throw uex;
}
}