directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Allen Zhao (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DIRSHARED-139) LdifReader missing attributes
Date Wed, 17 Oct 2012 19:58:05 GMT

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

Allen Zhao edited comment on DIRSHARED-139 at 10/17/12 7:57 PM:
----------------------------------------------------------------

Here is what I found. Not sure this is the design or bug.

If the the later attribute value has incompatible type, it will be ignored.

org.apache.directory.shared.ldap.model.entry.DefaultAttribute
Line: 1140
        if ( !isHR )
        {
Line: 1167
            // We can't add Binary values into a String Attribute
            LOG.info( I18n.err( I18n.ERR_04451 ) );

So the following entry pass the test.But all myconfigstringvalue base64 encoded.
dn: cn=DeviceTypes,cn=SDT,cn=prod_81,o=myconfiguration
cn: DeviceTypes
javaClassName: java.lang.String
myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg==
myconfigstringvalue: P:Phone (except BlackBerry)
myconfigstringvalue: 3:Internet only device
objectClass: top
objectClass: javaobject
objectClass: myconfigstringvaluedobject

                
      was (Author: allen.zhao@telus.com):
    Here is what I found. Not sure this is the design or bug.

The the later attribute has incompatible value type, it will be ignored. (note, myconfigstringvalue
is a java object, should support both binary and string)

org.apache.directory.shared.ldap.model.entry.DefaultAttribute
Line: 1140
        if ( !isHR )
        {
Line: 1167
            // We can't add Binary values into a String Attribute
            LOG.info( I18n.err( I18n.ERR_04451 ) );

So the following entry pass the test.But all myconfigstringvalue base64 encoded.
dn: cn=DeviceTypes,cn=SDT,cn=prod_81,o=myconfiguration
cn: DeviceTypes
javaClassName: java.lang.String
myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg==
myconfigstringvalue: P:Phone (except BlackBerry)
myconfigstringvalue: 3:Internet only device
objectClass: top
objectClass: javaobject
objectClass: myconfigstringvaluedobject

                  
> LdifReader missing attributes
> -----------------------------
>
>                 Key: DIRSHARED-139
>                 URL: https://issues.apache.org/jira/browse/DIRSHARED-139
>             Project: Directory Shared
>          Issue Type: Bug
>    Affects Versions: 1.0.0-M12
>         Environment: Linux
>            Reporter: Allen Zhao
>
> $ cat t.ldif
> dn: cn=DeviceTypes,cn=SDT,cn=prod_81,o=myconfiguration
> cn: DeviceTypes
> javaClassName: java.lang.String
> myconfigstringvalue: P:Phone (except BlackBerry)
> myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg==
> myconfigstringvalue: 3:Internet only device
> objectClass: top
> objectClass: javaobject
> objectClass: myconfigstringvaluedobject
> Code:
> LdifReader lr = new LdifReader(fileName);
> while (lr.hasNext()) {
>     LdifEntry e = lr.next();
>     System.out.println(e.toString());
> }
> The attribute "myconfigstringvalue:: WjpCbGFja0JlcnJ5w4LCrg==" missed.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message