[ 
https://issues.apache.org/jira/browse/DIRAPI-167?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Barney Barumba updated DIRAPI-167:
----------------------------------

    Attachment: DIRAPI-167-directory-client-api.patch

There's already a comment in the code that suggests the devs are aware of this:

{{// TODO: why do connect() and close() return a boolean? What is the 
difference between false and an Exception?}}

Anyway, as you said, the change is pretty simple, so here's a patch to save a 
few lines of typing if the devs decide to go ahead and make this change. This 
only addresses the {{close}} part, not the {{connect}} part.

Cheers,

> Make LdapConnection extend java.io.Closeable
> --------------------------------------------
>
>                 Key: DIRAPI-167
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-167
>             Project: Directory Client API
>          Issue Type: Improvement
>            Reporter: lucas theisen
>            Priority: Minor
>         Attachments: DIRAPI-167-directory-client-api.patch
>
>
> This very small modification would allow us to leverage the Java 7 
> try-with-resources feature.  The proper close method is already part of 
> LdapConnection, so the modification is extremely trivial.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to