db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: cvs commit: db-torque/src/generator/src/java/org/apache/torque/engine/database/transform XmlToAppData.java XmlToData.java
Date Mon, 28 Jul 2003 17:20:12 GMT
mpoeschl@apache.org writes:

>mpoeschl    2003/07/28 09:33:35

>  Modified:    src/generator/src/java/org/apache/torque/engine/database/transform
>                        XmlToAppData.java XmlToData.java
>  Log:
>  resolveEntity must not throw an IOException as the DefaultHandler method only throws
SAXEception
>  (while the sun compiler accepts this in eclipse i get an error)
>  so we catch the IOException and throw a SAXException

Well, Eclipse gets it wrong:

http://xml.apache.org/xerces2-j/javadocs/api/org/xml/sax/EntityResolver.html

--- cut ---
Method Detail

resolveEntity

public InputSource resolveEntity(java.lang.String publicId,
                                 java.lang.String systemId)
                          throws SAXException,
                                 java.io.IOException
--- cut ---

=> so resolveEntity might throw an java.io.IOException. However, the
overridden method in DefaultHandler does not, which is fine, because
Methods might throw _less_ Exceptions than defined in the
Interface. I'd say you've found a bug in Eclipse.

Personally, I'd prefer the IO Exception, because the caller can react
differently on these errors.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

Java, perl, Solaris, Linux, xSP Consulting, Web Services 
freelance consultant -- Jakarta Turbine Development  -- hero for hire

"You are being far too rational for this discussion."  
       --- Scott Robert Ladd in <3F1874B0.6030507@coyotegulch.com>

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Mime
View raw message