jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Julian Reschke <julian.resc...@gmx.de>
Subject Re: lack of toString?
Date Mon, 14 Apr 2008 08:26:54 GMT
Tobias Bocanegra wrote:
> hi,
> 
> On 4/12/08, Dave Brosius <dbrosius@mebigfatguy.com> wrote:
>> I notice that many of the classes in Jackrabbit lack a toString method.
>> Without them, it makes debugging code more difficult. My question is, is
>> that intentional?
> i don't think that this was intentional - just lazy :-) we added the
> toString() when needed.
> 
>> Did you want to avoid a problem of people using toString
>> for production code?
> no really. the toString() should only return debug text and never
> alter the state of the object.
> ...

I think the risk Dave was mentioning was that if, for instance, 
toString() returns the same thing as getString() (on Value), then people 
- by mistake - my call the incorrect method, thus making code non-portable.

BR, Julian

Mime
View raw message