|
From: Martin K. <Mar...@St...> - 2004-08-20 19:58:19
|
Hi folks,
Checking the Spring 1.1 RC2 remote code, I have noticed,
that the RemoteInvocationResult class is referring to Exception
rather than Throwable.
Visiting the InvocationTargetException the code reads:
/**
* Get the thrown target exception.
*
* <p>This method predates the general-purpose exception chaining
facility.
* The {@link Throwable#getCause()} method is now the preferred means of
* obtaining this information.
*
* @return the thrown target exception (cause of this exception).
*/
public Throwable getTargetException() {
return target;
}
So I guess it would be more consistent to use Throwable instead
of Exception since the Throwable would be more abstract (thus
more flexibile).
Summary:
public class RemoteInvocationResult implements Serializable {
private Object value;
private Exception exception;
should be changed into:
public class RemoteInvocationResult implements Serializable {
private Object value;
private Throwable exception;
Cheers,
Martin (Kersten)
|