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

Emmanuel Lecharny resolved DIRAPI-255.
--------------------------------------
    Resolution: Fixed

Fixed with http://svn.apache.org/viewvc?rev=1708486&view=rev

> An escaped space at the end of a RDN will not be kept due to a bug in the 
> ComplexDNParser
> -----------------------------------------------------------------------------------------
>
>                 Key: DIRAPI-255
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-255
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M31
>            Reporter: Emmanuel Lecharny
>             Fix For: 1.0.0-M32
>
>
> When we try to parse a DN like {{"cn=\\ a b c\\ "}}, the {{ComplexDnParser}} 
> will remove the last space due to this code :
> {code}
> attributeTypeAndValue [Rdn rdn] returns [String upName = ""]
>     {
>         matchedProduction( "attributeTypeAndValue()" );
>         String type = null;
>         UpAndNormValue value = new UpAndNormValue();
>         String upValue = null;
>     }
>     :
>     (
>         ( SPACE { upName += " "; } )*
>         type = attributeType { upName += type; }
>         ( SPACE { upName += " "; } )*
>         EQUALS { upName += "="; }
>         ( SPACE 
>         { 
>             upName += " "; 
>             
>             if ( upValue == null )
>             {
>                 upValue = " ";
>             }
>             else
>             {
>                 upValue += " "; 
>             } 
>         } )*
>         attributeValue[value] 
>         {
>             try
>             {
>                 if ( value.value instanceof String )
>                 {
>                     Object unescapedValue = Rdn.unescapeValue( Strings.trim( 
> (String)value.rawValue ) );
> ...
> {code}
> Here, the {{trim}} method will remove the last space, no matter if there is a 
> backslash before



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to