classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersisten


From: Archie Cobbs
Subject: Re: [cp-patches] Re: RFC: Patch for duplicate entries in serialPersistentFields
Date: Sun, 11 Dec 2005 13:37:31 -0600
User-agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.3) Gecko/20041129

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 exception you want. Then invoke
Class.newInstance() on the class.

-Archie

__________________________________________________________________________
Archie Cobbs      *        CTO, Awarix        *      http://www.awarix.com




reply via email to

[Prev in Thread] Current Thread [Next in Thread]