Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] Patch

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Elliotte Rusty Harold <elharo AT metalab.unc.edu>
  • To: "Bradley S. Huffman" <hip AT a.cs.okstate.edu>
  • Cc: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] Patch
  • Date: Wed, 18 Sep 2002 23:07:40 -0400

At 7:50 PM -0500 9/18/02, Bradley S. Huffman wrote:
Attribute.java has a recursive constructor and JDK 1.4 complained about
the signature of initCause in ParseException.java.

Thanks. The Attribute problem was easy enough to fix. I'm surprised the compiler didn't catch it. I added a unit test to catch this in the future.

The ParseException problem was easily found by switching to Java 1.4 for the compile. What I don't understand is why the change was necessary. Shoudln't an overriding method be allowed to return a subclass of the return type of the original, overridden method? In this case, a ParseException is a Throwable, after all. Any idea what's going on here?

I agree it's a problem and needs to be fixed. I'm just trying to understand why it's a problem in the first place.
--

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo AT metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| XML in a Nutshell, 2nd Edition (O'Reilly, 2002) |
| http://www.cafeconleche.org/books/xian2/ |
| http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/ |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+




Archive powered by MHonArc 2.6.24.

Top of Page