Added null check before trying to release parser
@@ -142,9 +142,11 @@ public class MimeTypesReader extends DefaultHandler implements MimeTypesReaderMe
} catch (SAXException e) {
throw new MimeTypeException("Invalid type configuration", e);
} finally {
+ if(parser != null) {
releaseParser(parser);
}
}
+ }
public void read(Document document) throws MimeTypeException {
try {
