protected void newCAS(PackageBrowser instPear, ResourceManager rsrcMgr) { // Create analysis engine from the installed PEAR package using // the created PEAR specifier XMLInputSource in = null; try { in = new XMLInputSource(instPear.getComponentPearDescPath()); ResourceSpecifier specifier = UIMAFramework.getXMLParser().parseResourceSpecifier(in); tae = UIMAFramework.produceAnalysisEngine(specifier, rsrcMgr, null); cas = tae.newCAS(); } catch (Exception e) { throw new RuntimeException(e); } finally { if(in != null) { try { in.close(); } catch (IOException e) { LOG.error("Exception while trying to close resource", e); } } } }
} finally { if (xmlIn != null) { xmlIn.close();
xmlIn.close();