commit | c7524e0610b5b3a73944734c2ae3b3c70822448a | [log] [tgz] |
---|---|---|
author | emmanuel lecharny <elecharny@apache.org> | Thu Jun 13 18:26:06 2019 +0200 |
committer | emmanuel lecharny <elecharny@apache.org> | Thu Jun 13 18:26:06 2019 +0200 |
tree | 5116ee679263d9ce8898515b6a321cc85c4296da | |
parent | 9ba50f5654425fc7dfa3cf0a4ab8e14348a3b935 [diff] | |
parent | 58a995ea3d36e59fc92d5dcd945c272832155412 [diff] |
Merge branch 'master' of https://gitbox.apache.org/repos/asf/directory-ldap-api
diff --git a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/NameOrNumericIdNormalizer.java b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/NameOrNumericIdNormalizer.java index 92371a8..95bd265 100644 --- a/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/NameOrNumericIdNormalizer.java +++ b/ldap/model/src/main/java/org/apache/directory/api/ldap/model/schema/normalizers/NameOrNumericIdNormalizer.java
@@ -95,8 +95,15 @@ return oid; } - // if all else fails - throw new LdapOtherException( I18n.err( I18n.ERR_13725_CANNOT_HANDLE_NAME_AND_OPTIONAL_UID_NORM, value ) ); + // if all else fails and the schema is not in relaxed mode, throw an exception + if ( schemaManager.isStrict() ) + { + throw new LdapOtherException( I18n.err( I18n.ERR_13725_CANNOT_HANDLE_NAME_AND_OPTIONAL_UID_NORM, value ) ); + } + else + { + return value; + } }