Jeff Turner wrote:
Looking in excalibur-xmlutil-20030122.jar, I found this class: org.apache.excalibur.xml.sax.Parser.

I guess you mean o.a.e.xml.sax.SAXParser (to complement
o.a.e.xml.dom.DOMParser).
Oh yes, but I'm still using excalibur-xmlutil-20030115.jar instead of excalibur-xmlutil-20030122.jar. Guess I'd better upgrade.

(cripes.. I've been happily nulling it in my code.. I'd better go fix:)
I thought it was recommended to always release a component obtained from the CM.

You should get back a JaxpParser instance, which is a Component, so the
cast is valid.  I'd imagine the compiler doesn't realise this at
compile-time, and you'd get a ClassCastException if it wasn't a
Component.
I was under the (probably mistaken) impression that in Java you couldn't cast an expression to an unrelated type, but apparently it is legal if the type is an interface and not a class. You never stop learning ;-).

Ugo

--
Ugo Cei - http://www.beblogging.com/blog/


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to