| | |
| | | final String attributeDescription, final Schema schema) |
| | | throws LocalizedIllegalArgumentException |
| | | { |
| | | final boolean allowMalformedNamesAndOptions = schema |
| | | .allowMalformedNamesAndOptions(); |
| | | int i = 0; |
| | | final int length = attributeDescription.length(); |
| | | char c = 0; |
| | |
| | | } |
| | | |
| | | cp = ASCIICharProp.valueOf(c); |
| | | if (!cp.isKeyChar()) |
| | | if (!cp.isKeyChar(allowMalformedNamesAndOptions)) |
| | | { |
| | | final LocalizableMessage message = ERR_ATTRIBUTE_DESCRIPTION_ILLEGAL_CHARACTER |
| | | .get(attributeDescription, c, i); |
| | |
| | | } |
| | | |
| | | // Get the attribute type from the schema. |
| | | AttributeType attributeType; |
| | | final AttributeType attributeType; |
| | | try |
| | | { |
| | | attributeType = schema.getAttributeType(oid); |
| | |
| | | } |
| | | |
| | | cp = ASCIICharProp.valueOf(c); |
| | | if (!cp.isKeyChar()) |
| | | if (!cp.isKeyChar(allowMalformedNamesAndOptions)) |
| | | { |
| | | final LocalizableMessage message = ERR_ATTRIBUTE_DESCRIPTION_ILLEGAL_CHARACTER |
| | | .get(attributeDescription, c, i); |
| | |
| | | } |
| | | |
| | | cp = ASCIICharProp.valueOf(c); |
| | | if (!cp.isKeyChar()) |
| | | if (!cp.isKeyChar(allowMalformedNamesAndOptions)) |
| | | { |
| | | final LocalizableMessage message = ERR_ATTRIBUTE_DESCRIPTION_ILLEGAL_CHARACTER |
| | | .get(attributeDescription, c, i); |