You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2016/02/03 21:08:40 UTC

[jira] [Commented] (DIRAPI-265) Deserialized Dn loses bytes field resulting in null dn, treated as Root DSE when encoded in ModifyRequests

    [ https://issues.apache.org/jira/browse/DIRAPI-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15131040#comment-15131040 ] 

Emmanuel Lecharny commented on DIRAPI-265:
------------------------------------------

Many thanks Gerald !

I'll apply the patch asap !

> Deserialized Dn loses bytes field resulting in null dn, treated as Root DSE when encoded in ModifyRequests
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: DIRAPI-265
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-265
>             Project: Directory Client API
>          Issue Type: Bug
>            Reporter: Gerald Turner
>             Fix For: 1.0.0-M33
>
>         Attachments: Dn-Serialize-null-bytes-Fix.patch, Dn-Serialize-null-bytes-Test.patch
>
>
> The Dn class is Externalizable and has fields normName and bytes.  The readExternal/writeExternal methods preserve the normName field, but ignore the bytes field.  The Dn class has a static method, getBytes, which will return null if the Dn instance had been deserialized.  The ModifyRequestDecorator uses the Dn getBytes method when encoding the entry name onto the PDU, resulting in a zero length sequence if the Dn had been deserialized, therefore treated like the Root DSE.



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