dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/ArchiveAnalyzer.java
/**
     * The initialize method does nothing for this Analyzer.
     *
     * @throws InitializationException is thrown if there is an exception
     * deleting or creating temporary files
     */
The initialize method does nothing for this Analyzer.
@throws InitializationException is thrown if there is an exception
deleting or creating temporary files
The initialize method does nothing for this Analyzer . @throws InitializationException is thrown if there is an exception deleting or creating temporary files
@Override
    public void initializeFileTypeAnalyzer() throws InitializationException {
        try {
            final File baseDir = Settings.getTempDirectory();
            tempFileLocation = File.createTempFile("check", "tmp", baseDir);
            if (!tempFileLocation.delete()) {
                setEnabled(false);
                final String msg = String.format("Unable to delete temporary file '%s'.", tempFileLocation.getAbsolutePath());
                throw new InitializationException(msg);
            }
            if (!tempFileLocation.mkdirs()) {
                setEnabled(false);
                final String msg = String.format("Unable to create directory '%s'.", tempFileLocation.getAbsolutePath());
                throw new InitializationException(msg);
            }
        } catch (IOException ex) {
            setEnabled(false);
            throw new InitializationException("Unable to create a temporary file", ex);
        }
    }
@ Override public void initializeFileTypeAnalyzer ( ) throws InitializationException { try { final File baseDir = Settings . getTempDirectory ( ) ; tempFileLocation = File . createTempFile ( "check" , "tmp" , baseDir ) ; if ( ! tempFileLocation . delete ( ) ) { setEnabled ( false ) ; final String msg = String . format ( "Unable to delete temporary file '%s'." , tempFileLocation . getAbsolutePath ( ) ) ; throw new InitializationException ( msg ) ; } if ( ! tempFileLocation . mkdirs ( ) ) { setEnabled ( false ) ; final String msg = String . format ( "Unable to create directory '%s'." , tempFileLocation . getAbsolutePath ( ) ) ; throw new InitializationException ( msg ) ; } } catch ( IOException ex ) { setEnabled ( false ) ; throw new InitializationException ( "Unable to create a temporary file" , ex ) ; } }
The initialize method does nothing for this Analyzer.
The initialize method does nothing for this Analyzer .