The reader used to read the service provider is never closed if an IOException is thrown while reading from it. Adding a finally block so that the reader will always be closed. git-svn-id: https://svn.apache.org/repos/asf/xml/commons/trunk@226238 13f79535-47bb-0310-9956-ffa450edef68