On 10/12/2015 08:26 PM, Emmanuel Lécharny wrote:
> Hi guys,
> 
> last week and most of this week-end, I was working on fixingthe way we
> propagate the SchemaManager in a DN (see conversation on
> [email protected] ML). The thing is that when we parse a DN and
> appky the schemaManager on it, this schemaManager was never propagated
> down to teh AVA and teh Value.
> 
> As a reminder :
> 
> DN -> RDN+
> RDN -> AVA+
> AVA -> AttributeType ':' Value
> 
> Where Value can be either a StringValue or a BinaryValue.
> 
> In all instances, we keep an UP vakue and a Norm value. The NormValue
> will be created applying the Normalizer fetched from the schema,
> accordingly to the AttributeType's Syntax.
> 
> The API was not doing so, except at the RDN level (is, teh AVA and Value
> never get saw the SchemaManager).
> 
> I have successfully changed the API to propagate the SchemaManager dow
> to the Ava and Value, which was quite a pain. In the process, I have
> found that *many* tests were simply plain wrong... Having fixed them was
> not the end of my pain :/
> 
> I just created an issue :
> 
> https://issues.apache.org/jira/browse/DIRSERVER-1974
> 
> This is about a test in the server which is plain wrong : we try to
> rename an entry, providing a second RDN, expecting the new value being
> present in the entry within the old value (the deleteOldRdn flag is not
> set). And the test *passes*; never mind if the Attribute is a
> Single-Value attribute !
> 
> I'm trying to fix all those issues (and we have many), but that means we
> still have a lot of basic errors all around...
> 
> More to come !
> 

Thanks Emmanuel to bear the pain and fixing the mess. I remember that
Dn/Rdn/Ava classes are very large and complex, they are mutable and have
multiple states (normalized=true/false, schemamanager=null/notnull). I
think I tried to simplify that multiple times, but always failed.

Kind Regards,
Stefan

Reply via email to