mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-28 11:52:15 +01:00
Removed a redundant null check, and replaced an addAll with the constructor population.
This commit is contained in:
@@ -184,7 +184,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
if (tempFileLocation != null && tempFileLocation.exists()) {
|
if (tempFileLocation != null && tempFileLocation.exists()) {
|
||||||
LOGGER.debug("Attempting to delete temporary files");
|
LOGGER.debug("Attempting to delete temporary files");
|
||||||
final boolean success = FileUtils.delete(tempFileLocation);
|
final boolean success = FileUtils.delete(tempFileLocation);
|
||||||
if (!success && tempFileLocation != null && tempFileLocation.exists() && tempFileLocation.list().length > 0) {
|
if (!success && tempFileLocation.exists() && tempFileLocation.list().length > 0) {
|
||||||
LOGGER.warn("Failed to delete some temporary files, see the log for more details");
|
LOGGER.warn("Failed to delete some temporary files, see the log for more details");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -278,8 +278,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
final Set<Dependency> newDependencies;
|
final Set<Dependency> newDependencies;
|
||||||
if (sizeChanged) {
|
if (sizeChanged) {
|
||||||
//get the new dependencies
|
//get the new dependencies
|
||||||
newDependencies = new HashSet<Dependency>();
|
newDependencies = new HashSet<Dependency>(after);
|
||||||
newDependencies.addAll(after);
|
|
||||||
newDependencies.removeAll(before);
|
newDependencies.removeAll(before);
|
||||||
} else {
|
} else {
|
||||||
newDependencies = EMPTY_DEPENDENCY_SET;
|
newDependencies = EMPTY_DEPENDENCY_SET;
|
||||||
|
|||||||
Reference in New Issue
Block a user