Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Re: No-args exception constructors

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Trimmer, Todd" <todd.trimmer AT trizetto.com>
  • To: "'xom-interest AT lists.ibiblio.org'" <xom-interest AT lists.ibiblio.org>
  • Subject: [XOM-interest] Re: No-args exception constructors
  • Date: Wed, 3 Dec 2003 10:39:50 -0700

Default ctors for Exceptions might be used for serialization or JavaBean
introspection related technology. I cannot cite any specific examples of why
someone would want to serialize an Exception, either by itself, or as part
of an aggregate that wants to serialize. Nor can I cite a good use case for
mingling Exceptions with introspection. I am personally in favor of removing
no-arg ctors. I just wanted to bring those two things up so maybe it will
make light bulbs go off in someone else's head about something important.

A question to ask would be, "Should ALL implementations/subclasses of
Throwable/Exception lack a no-arg ctor?" If yes, then we should have no
qualms about removing them from XOM.

Exception doesn't have a setMessage(String) method, so it's not like some
sort of scripting technology that bridges to Java can more easily create
Exceptions by doing the object creation and setting its values in two
distinct steps. So why bother with a no-arg ctor at all?



Todd Trimmer



  • [XOM-interest] Re: No-args exception constructors, Trimmer, Todd, 12/03/2003

Archive powered by MHonArc 2.6.24.

Top of Page