From dev-return-34015-apmail-directory-dev-archive=directory.apache.org@directory.apache.org Thu Jun 03 14:24:26 2010 Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 68477 invoked from network); 3 Jun 2010 14:24:25 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Jun 2010 14:24:25 -0000 Received: (qmail 62877 invoked by uid 500); 3 Jun 2010 14:24:25 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 62834 invoked by uid 500); 3 Jun 2010 14:24:25 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 62819 invoked by uid 99); 3 Jun 2010 14:24:24 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jun 2010 14:24:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 Jun 2010 14:24:21 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o53EO0qT029653 for ; Thu, 3 Jun 2010 14:24:00 GMT Message-ID: <16884232.159411275575040424.JavaMail.jira@thor> Date: Thu, 3 Jun 2010 10:24:00 -0400 (EDT) From: "Stefan Seelmann (JIRA)" To: dev@directory.apache.org Subject: [jira] Closed: (DIRSHARED-40) DN parser, LdapDN, Rdn, Atav issues In-Reply-To: <888235504.1259015019670.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DIRSHARED-40?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Stefan Seelmann closed DIRSHARED-40. ------------------------------------ > 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 (=) 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 = (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.