RFC2255 [1] allows any of attribute, scope, filter and extension to be empty. Code in com.sun.jndi.ldap package expects empty values to be represented by null, but LdapURL parsing method leaves optional parameters as "" (empty string). Test URL: ldap://localhost:10389/ou=RefPeople,dc=example,dc=com???? Expected result: ldapUrl.getAttributes() == null ldapUrl.getFilter() == null ldapUrl.getScope() == null ldapUrl.getExtension() == null Actual result: ldapUrl.getAttributes() == "" ldapUrl.getFilter() == "" ldapUrl.getScope() == "" ldapUrl.getExtension() == "" [1] https://tools.ietf.org/html/rfc2255#section-3
|