Steve Moyer created DIRAPI-157:
----------------------------------

             Summary: Calling the add() method with a multi-value attribute and 
a null value throws an NPE
                 Key: DIRAPI-157
                 URL: https://issues.apache.org/jira/browse/DIRAPI-157
             Project: Directory Client API
          Issue Type: Bug
            Reporter: Steve Moyer


The code that causes the problem would be something like:

entry.add("mail", null);

Alternately this code works:

entry.add("mail", new String[0]);

The stack trace from the failing code is as follows:

Caused by: java.lang.NullPointerException
        at 
org.apache.directory.api.ldap.model.entry.DefaultAttribute.add(DefaultAttribute.java:1006)
 [api-all-1.0.0-M20.jar:1.0.0-M20]
        at 
org.apache.directory.api.ldap.model.entry.DefaultAttribute.<init>(DefaultAttribute.java:353)
 [api-all-1.0.0-M20.jar:1.0.0-M20]
        at 
org.apache.directory.api.ldap.model.entry.DefaultEntry.put(DefaultEntry.java:1415)
 [api-all-1.0.0-M20.jar:1.0.0-M20]


--
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

Reply via email to