Hi,
just a quick Q :
we have many methods 'add' in this class. Should we always check that
the added value is syntaxically correct ? The current version does not
check this :
public boolean add( String val )
{
return values.add( new ServerStringValue( attributeType, val ) );
}
I suggest that we should write this method this way :
public boolean add( String val ) throws
InvalidAttributeValueException, NamingException
{
if ( attributeType.getSyntax().isHumanReadable() )
{
attributeType.getSyntax().getSyntaxChecker().assertSyntax(
val );
return values.add( new ServerStringValue( attributeType, val
) );
}
else
{
throw new InvalidAttributeValueException();
}
}
wdyt ?
--
--
cordialement, regards,
Emmanuel Lécharny
www.iktek.com
directory.apache.org