public LdapName parseAsLdapNameOrLog( String value )
    {
        LdapName result = null;
        if ( value != null && !value.isEmpty() )
        {
            try
            {
                return new LdapName( value );
            }
            catch ( InvalidNameException ex )
            {
                Log.error( "Unable to parse LDAPvalue '{}'.", value, ex );
            }
        }
        return result;
    }
Attempts to parse a string value as an LdapName.

This method returns null (and logs an error) if the value was non-null
and non-empty and the parsing fails.

This method returns null if the provided value was null or empty.

@param value The value to be parsed (can be null or empty).
@return The parsed value, possibly null.
xmppserver/src/main/java/org/jivesoftware/openfire/ldap/LdapManager.java