mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 00:03:43 +01:00
lgtm suggested changes
This commit is contained in:
@@ -237,9 +237,10 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer {
|
||||
if (tmp <= 0) {
|
||||
return path;
|
||||
}
|
||||
if (tmp > 0) {
|
||||
//below is always true
|
||||
//if (tmp > 0) {
|
||||
pos = tmp + 1;
|
||||
}
|
||||
//}
|
||||
tmp = path.indexOf(File.separator, pos);
|
||||
if (tmp > 0) {
|
||||
pos = tmp + 1;
|
||||
|
||||
@@ -302,12 +302,14 @@ public class NvdCveUpdater implements CachedWebDataSource {
|
||||
}
|
||||
}
|
||||
|
||||
if (maxUpdates >= 1) { //ensure the modified file date gets written (we may not have actually updated it)
|
||||
//always true because <=0 exits early above
|
||||
//if (maxUpdates >= 1) {
|
||||
//ensure the modified file date gets written (we may not have actually updated it)
|
||||
dbProperties.save(updateable.get(MODIFIED));
|
||||
LOGGER.info("Begin database maintenance.");
|
||||
cveDb.cleanupDatabase();
|
||||
LOGGER.info("End database maintenance.");
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -249,7 +249,8 @@ public final class ExtractionUtil {
|
||||
throw new IOException("Unable to rename '" + file.getPath() + "'");
|
||||
}
|
||||
final File newFile = new File(originalPath);
|
||||
try (GZIPInputStream cin = new GZIPInputStream(new FileInputStream(gzip));
|
||||
try (FileInputStream fis = new FileInputStream(gzip);
|
||||
GZIPInputStream cin = new GZIPInputStream(fis);
|
||||
FileOutputStream out = new FileOutputStream(newFile)) {
|
||||
IOUtils.copy(cin, out);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user