jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dave Brosius" <dbros...@mebigfatguy.com>
Subject Re: lack of toString?
Date Mon, 14 Apr 2008 20:12:32 GMT
>>This risk could be mitigated by returning a prefix (for example the
class name) and the value (except for binaries of course):

Yes, I agree. I tend to do things like

ItemImpl[Name=Foo;Type=Boohoo]

as a toString format.

So long as this is ok, i'll add them.


-----Original Message-----
From: Thomas Mueller <thomas.tom.mueller@gmail.com>
Sent: Monday, April 14, 2008 4:37am
To: dev@jackrabbit.apache.org
Subject: Re: lack of toString?

Hi,

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

This risk could be mitigated by returning a prefix (for example the
class name) and the value (except for binaries of course):

public String toString() {
    return getClass().getName() + ":" + lNumber;
}

Regards,
Thomas



Mime
View raw message