directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (DIRSHARED-40) DN parser, LdapDN, Rdn, Atav issues
Date Thu, 03 Jun 2010 14:22:04 GMT

     [ https://issues.apache.org/jira/browse/DIRSHARED-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Stefan Seelmann resolved DIRSHARED-40.
--------------------------------------

    Fix Version/s: 0.9.20
                       (was: 1.0.0-RC1)
       Resolution: Fixed

Fixed the remaining issues.

> DN parser, LdapDN, Rdn, Atav issues
> -----------------------------------
>
>                 Key: DIRSHARED-40
>                 URL: https://issues.apache.org/jira/browse/DIRSHARED-40
>             Project: Directory Shared
>          Issue Type: Bug
>    Affects Versions: 0.9.15
>            Reporter: Stefan Seelmann
>             Fix For: 0.9.20
>
>
> In the last days I tried to fix DIRSHARED-39 and investigated some issues in the DN/Rdn/ATAV
implementation. I just want to write them down, I think it makes sense to fix them after the
schema branch is finished.
> Class AttributeTypeAndValue:
> - the first three constructors are not used by productive code, only by unit tests  (TODO)
> - setType, setTypeNormalized, setValueNormalized are never used  (TODO)
> - getNormalizedValue returns a name (<type>=<value>) instead of a value 
(fixed)
> - the meaning of upValue and normValue is not clear to me and is not consistent, see
below  (fixed)
> - upValue and normValue are of type Value<?>, however they contain escaped string
values. IMO they should contain the real unescaped values because the escapes are only necessary
for the DN string representation. For this case we have another field upName that contains
<type>=<escaped value>  (fixed)
> Class Rdn:
> - three methods getValue, getUpValue, getNormValue; what does getValue() mean?  (fixed)
> - getNormValue() for MV-RDN returns the calls ATAV.getNormalizedValue() which returns
a name  (fixed)
> - the meaning of upValue and normValue is not clear to me and not consistent, see below
 (fixed)
> - getUpValue and getNormValue always return strings, what if RDN value is binary?  (TODO)
> Class RdnParser:
> - this is still a hand-written parser. The hand-written code should be removed and the
FastDnParser and ComplexDnParser should be used (like LdapDnParser)  (fixed)
> General:
> - getNormValue and getUpValue should return the Value<?> object instead of a String
or byte[]  (TODO)
> - getUpValue returns the escaped value, thus in the server and studio code we need to
call Rdn.unescapeValue() to get the unescaped value  (fixed)
> - the normalizing is quite complex, I was not able to understand how it works. (fixed)
> Example: for the DN "ou=A\ " (trailing escaped whitespace) we have the following issues:
> After calling 
>   LdapDN dn = new LdapDN("ou=A\\ ");
> we have the following result:
>   upValue is escaped: "A\ "  (fixed, now it is "A ")
>   nornValue is unescaped: "A "  (doesn't make sense to check this before normalization)
>   upName and normName are escaped: "ou=A\ " (ok)
> After calling
>   dn.normalize( oidOids );
> we have the following result:
>   upValue is still escaped: "A\ " (fixed, now it is "A ")
>   normValue is "a" -> the space is gone!!! (this is ok, the space is removed by the
normalizer because it is not relevant for cn's syntax/matching)
>   upName is "ou=A\ " (ok)
>   normName is "2.5.4.11=a" -> the space is gone!!! (this is ok, the space is removed
by the normalizer because it is not relevant for cn's syntax/matching)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message