directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fel...@apache.org>
Subject toString(null) -> "null" or "" [was: Valid filter?]
Date Fri, 29 Oct 2010 15:31:12 GMT
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;'


Felix

Mime
View raw message