directory-api mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bowman,Andrew" <>
Subject Groovy LDAP API - search returns all attributes when a list of attributes is provided
Date Wed, 02 Mar 2016 20:40:25 GMT
I'm having an issue where ldap searches with attribute lists return all attributes on the object
regardless of the attributes in the provided list.

Here's my environment:

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

Groovy Version: 2.4.5 JVM: 1.8.0_20 Vendor: Oracle Corporation OS: Windows 7

Using the Groovy LDAP API available from

Here's a sample of the code:


Search s = new Search()
s.filter = '(eid=*)'
s.base ='ou=div,ou=emp,o=co'
s.scope = 'ONE'
s.attrs = ['eid', 'sn', 'givenname']

results =

println " ${results.size} entries found ".center(40,'-')
for (entry in results) {
   println entry.dump()

Running this

println s.getAttrs()

Yeilds this:

[eid, sn, givenname]

So I know the attribute list is set correctly.

I am trying to pull back a relatively large number of entries so the query is slow and memory
usage soars because of all the unneeded attributes.

Is this a bug or am I missing something obvious?



  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message