cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <g...@tuffmail.com>
Subject Re: JXPathHelper
Date Mon, 24 Dec 2007 14:50:52 GMT
Ralph Goers pisze:
> I have verified that the code below gets my new XPathXMLFileModule
> working again. However, I'm still not sure that is the correct thing to
> do as the change essentially broke the contract. So although I could
> make the same change in all the affected Cocoon classes any customer who
> happened to use JXPathHelper for their own purposes would also have
> problems.

I agree that fix for COCOON-2108 changed the contract but I don't agree it broke as I think
it's
been broken earlier. Issue COCOON-2108 was caused by the fact that getAttribute was doing
something
completely unexpected. Instead of returning an Object it returns String representation of
Object.
That's bad situation and if someone relies on bad API it's also his business to fix his code.

I think the best is to introduce new method like getAttributeAsString and switch to it everywhere
it's needed.

-- 
Grzegorz

Mime
View raw message