The following document contains the results of PMD's CPD 5.0.2.
| File | Line |
|---|---|
| org\owasp\dependencycheck\analyzer\ArchiveAnalyzer.java | 149 |
| org\owasp\dependencycheck\analyzer\JarAnalyzer.java | 906 |
@Override
public void initialize() throws Exception {
final File baseDir = Settings.getTempDirectory();
if (!baseDir.exists()) {
if (!baseDir.mkdirs()) {
final String msg = String.format("Unable to make a temporary folder '%s'", baseDir.getPath());
throw new AnalysisException(msg);
}
}
tempFileLocation = File.createTempFile("check", "tmp", baseDir);
if (!tempFileLocation.delete()) {
final String msg = String.format("Unable to delete temporary file '%s'.", tempFileLocation.getAbsolutePath());
throw new AnalysisException(msg);
}
if (!tempFileLocation.mkdirs()) {
final String msg = String.format("Unable to create directory '%s'.", tempFileLocation.getAbsolutePath());
throw new AnalysisException(msg);
}
}
/**
* The close method deletes any temporary files and directories created during analysis.
*
* @throws Exception thrown if there is an exception deleting temporary files
*/
@Override
public void close() throws Exception { | |