directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radovan Semancik <>
Subject API relaxed mode
Date Tue, 28 Apr 2015 10:09:27 GMT

I'm back to work on the API support for OpenLDAP an other servers. I've 
explored the situation a bit. I still do not know what was the original 
reason for the relaxed mode (does anyone know?). But it looks like if I 
make all the exceptions needed for processing OpenLDAP schema into the 
relaxed mode then it is just too much. It breaks the tests and I'm 
afraid that it may also break existing code that relies on the API.

It looks like we need more than just relaxed=true/false. I propose the 
change from boolean isRelaxed in Registries (and related places) to enum 
with three values: STRICT, RELAXED and LAX. Strict and relaxed modes 
will be used as they are used today. The new lax mode will be used for 
OpenLDAP and other dirty schemas.

As I'm still new to this project I would like someone more senior to 
check that this is generally a good idea.

(of course, I'll commit it after the release)

Radovan Semancik
Software Architect

> On 03/20/2015 04:07 PM, Radovan Semancik wrote:

> I had a closer look at this. Tests are failing after my modification. 
> The reason seems to be this: (Registries:1344)
>     public List<Throwable> add( List<Throwable> errors, SchemaObject 
> schemaObject, boolean check ) throws LdapException
>     {
>         // Relax the registries
>         boolean wasRelaxed = isRelaxed;
>         setRelaxed();
>         ...
> This causes that operations that failed before my modifications are no 
> longer failing as this explicitly sets relaxed mode.
> Is there any particular reason why Registries.add(...) sets relaxed mode? 

View raw message