directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <kayyag...@apache.org>
Subject Re: toString(null) -> "null" or "" [was: Valid filter?]
Date Fri, 29 Oct 2010 15:48:34 GMT
On 10/29/10, Felix Knecht <felixk@apache.org> wrote:
> Imagine following test:
>
> String str="(objectClass=)";
> ExprNode node = FilterParser.parse( str );
> assertEquals( str, node.toString() );
>
> This test will fail ATM because we do
> 'return value == null ? "null" : value;'
>
> This is done in
> - org.apache.directory.shared.ldap.entry.StringValue
> - org.apache.directory.shared.ldap.entry.BinaryValue
>
> So what's closer to what we really want to show?
>
> My +1 for returning an empty String instead if "null"
> 'return value == null ? "" : value;'
+1
>
>
> Felix
>


-- 
Kiran Ayyagari

Mime
View raw message