dependency-check-core/src/main/java/org/owasp/dependencycheck/xml/hints/HintParser.java
/**
     * Parses the given XML file and returns a list of the hints contained.
     *
     * @param file an XML file containing hints
     * @return a list of hint rules
     * @throws HintParseException thrown if the XML file cannot be parsed
     */
Parses the given XML file and returns a list of the hints contained.
@param file an XML file containing hints
@return a list of hint rules
@throws HintParseException thrown if the XML file cannot be parsed
Parses the given XML file and returns a list of the hints contained . @param file an XML file containing hints @return a list of hint rules @throws HintParseException thrown if the XML file cannot be parsed
public Hints parseHints(File file) throws HintParseException {
        try {
            try (FileInputStream fis = new FileInputStream(file)) {
                return parseHints(fis);
            } catch (IOException ex) {
                LOGGER.debug("", ex);
                throw new HintParseException(ex);
            }
        } catch (SAXException ex) {
            try (FileInputStream fis = new FileInputStream(file)) {
                return parseHints(fis, HINT_SCHEMA_OLD);
            } catch (SAXException | IOException ex1) {
                throw new HintParseException(ex);
            }
        }
    }
public Hints parseHints ( File file ) throws HintParseException { try { try ( FileInputStream fis = new FileInputStream ( file ) ) { return parseHints ( fis ) ; } catch ( IOException ex ) { LOGGER . debug ( "" , ex ) ; throw new HintParseException ( ex ) ; } } catch ( SAXException ex ) { try ( FileInputStream fis = new FileInputStream ( file ) ) { return parseHints ( fis , HINT_SCHEMA_OLD ) ; } catch ( SAXException | IOException ex1 ) { throw new HintParseException ( ex ) ; } } }
Parses the given XML file and returns a list of the hints contained.
Parses the given XML file and returns a list of the hints contained .
//TODO there must be a better way to determine which schema to use for validation.