private Document getSpecification(Task task) throws ParserConfigurationException, SAXException, IOException { Document document = specificationCache.get(task.getName()); if (document == null) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.parse(task.getSpecification()); specificationCache.put(task.getName(), document); } return document; }
private Document getSpecification(Task task) throws ParserConfigurationException, SAXException, IOException { Document document = specificationCache.get(task.getName()); if (document == null) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.parse(task.getSpecification()); specificationCache.put(task.getName(), document); } return document; }
private Document getSpecification(Task task) throws ParserConfigurationException, SAXException, IOException { Document document = specificationCache.get(task.getName()); if (document == null) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.parse(task.getSpecification()); specificationCache.put(task.getName(), document); } return document; }
private Document getSpecification(Task task) throws ParserConfigurationException, SAXException, IOException { Document document = specificationCache.get(task.getName()); if (document == null) { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); document = builder.parse(task.getSpecification()); specificationCache.put(task.getName(), document); } return document; }