Good habit. For example, I should always close my InputStream classes, even if I use ByteArrayInputStream, where the close () method is non-op. Thus, if I change it to some other implementation later, that is not all that needs to be changed.
In the same case - if you call close (), you will be more compatible with any JNDI implementation.
Jesse barnum
source share