ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonas Göransson <>
Subject Re: Serializable Location?
Date Mon, 15 Jul 2002 12:28:17 GMT

Stephane Bailliez wrote:

>>-----Original Message-----
>>From: Jonas Göransson []
>>I've written a task which uses RMI in order to execute a core 
>>Ant task 
>>on a remote host. The current design
>>passes back a BuildException over rmi if the build fails.
>>The BuildException implements the interface Serializable but 
>>contains a 
>>reference to the class Location which doesn't.
>>This makes the BuildException not serializable if it contains a 
>>location. Would there be any problems changing the class Location
>>by adding the implements Serializable declaration and there by making 
>>BuildException truly serializable?
>Don't think there is any problem with that. I wanted to do this a long time
>ago but I'm not sure about what it really brings...the exception is not
>serializable so you won't have the stacktrace I believe.
In my case it's only the convenience to be able to pass the 
BuildExceptions through to the client without having to
convert it into some serializable format. But the BuildException 
serialization will fail if the Throwable which might have
caused the exception isn't serializable so I would still have to perform 
a check in order to be safe.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message