| | |
| | | { |
| | | // We'll use the decodeMatchingRule method to determine if the value |
| | | // is acceptable. |
| | | final String definition = value.toString(); |
| | | try |
| | | { |
| | | final String definition = value.toString(); |
| | | final SubstringReader reader = new SubstringReader(definition); |
| | | |
| | | // We'll do this a character at a time. First, skip over any |
| | |
| | | { |
| | | // This means that the value was empty or contained only |
| | | // whitespace. That is illegal. |
| | | final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_EMPTY_VALUE.get(); |
| | | final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_EMPTY_VALUE1 |
| | | .get(definition); |
| | | final DecodeException e = DecodeException.error(message); |
| | | StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax", |
| | | "valueIsAcceptable", e); |
| | |
| | | } |
| | | else |
| | | { |
| | | final LocalizableMessage message = ERR_ATTR_SYNTAX_ILLEGAL_TOKEN |
| | | .get(tokenName); |
| | | final LocalizableMessage message = ERR_ATTR_SYNTAX_MR_ILLEGAL_TOKEN1 |
| | | .get(definition, tokenName); |
| | | final DecodeException e = DecodeException.error(message); |
| | | StaticUtils.DEBUG_LOG.throwing("MatchingRuleSyntax", |
| | | "valueIsAcceptable", e); |
| | |
| | | } |
| | | catch (final DecodeException de) |
| | | { |
| | | invalidReason.append(de.getMessageObject()); |
| | | invalidReason.append(ERR_ATTR_SYNTAX_MR_INVALID1.get(definition, |
| | | de.getMessageObject())); |
| | | return false; |
| | | } |
| | | } |