{
// First, loop on all attributes
for ( EntryAttribute attribute : entry )
{
AttributeType attributeType = attribute.getAttributeType();
SyntaxChecker syntaxChecker = attributeType.getSyntax().getSyntaxChecker();
if ( syntaxChecker instanceof OctetStringSyntaxChecker )
{
// This is a speedup : no need to check the syntax of any value
// if all the syntaxes are accepted...
continue;
}
// Then loop on all values
for ( Value<?> value : attribute )
{
if ( value.isValid() )
{
// No need to validate something which is already ok
continue;
}
try
{
syntaxChecker.assertSyntax( value.get() );
}
catch ( Exception ne )
{
String message = I18n.err( I18n.ERR_280, value.getString(), attribute.getUpId() );
LOG.info( message );