cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: JXPathHelper
Date Mon, 24 Dec 2007 16:04:00 GMT
On Dec 24, 2007, at 9:50 AM, Grzegorz Kossakowski wrote:

> 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.

Even though it looks like it is more work, it does make sense to me.

Vadim

Mime
View raw message