Hi,
On Wed, 2005-12-14 at 20:39 +0100, Guilhem Lavaux wrote:
Mark, actually I don't see what benefit we could get of moving some
Array.sort copy to getSerialPersistentFields. So I have not done it
for the moment.
No problem, I just hoped we could safe some duplicate code, but I didn't
Hi,
I have just commited the attached patch which is just a slight
modification of what I have already sent with some documentation.
Mark, actually I don't see what benefit we could get of moving some
Array.sort copy to getSerialPersistentFields. So I have not done it
for the moment.
On 12/11/05, Guilhem Lavaux [EMAIL PROTECTED] wrote:
Bah ! I would rather use a native function that will throw directly
InvalidClassException. The problem is that's will be anyway hidden to
the general user and that he/she may be surprised getting that sort of
exception.
I dunno, this seems
Hi Stuart,
On Sun, 2005-12-11 at 21:42 -0500, Stuart Ballard wrote:
Throw.uncheckedThrow(new InvalidClassException(...));
A perfectly portable illegal-exception-thrower :)
It is a nice hack. But I agree with Guilhem that illegally throwing
checked exceptions from methods which are not
Hi.
Stuart Ballard wrote:
I dunno, this seems pretty clean if it works:
public class Throw {
private static Throwable t;
public Throw() throws Throwable {throw t;}
public static synchronized void uncheckedThrow(Throwable t) {
Throw.t = t;
try {
Why not do similar and throw the InvalidClassException from
ObjectStreamClass.lookup()?
(But then document that clearly in our version of course.)
Because we would not have the same API. ObjectStreamClass.lookup may not
throw any exception (except the default ones like Error, NPE, ...).
Stuart Ballard wrote:
Jeroen pointed out to me a while back that you can use generics to throw an
unchecked exception:
There's also a way to do this without using JDK 1.5 stuff, but it's
even uglier :-)
Construct a class (dynamically) that has a default constructor
that simply throws whatever
Archie Cobbs wrote:
Stuart Ballard wrote:
Jeroen pointed out to me a while back that you can use generics to
throw an
unchecked exception:
There's also a way to do this without using JDK 1.5 stuff, but it's
even uglier :-)
Construct a class (dynamically) that has a default constructor