mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-26 19:11:29 +01:00
lgtm suggested changes
This commit is contained in:
@@ -237,9 +237,10 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer {
|
|||||||
if (tmp <= 0) {
|
if (tmp <= 0) {
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
if (tmp > 0) {
|
//below is always true
|
||||||
|
//if (tmp > 0) {
|
||||||
pos = tmp + 1;
|
pos = tmp + 1;
|
||||||
}
|
//}
|
||||||
tmp = path.indexOf(File.separator, pos);
|
tmp = path.indexOf(File.separator, pos);
|
||||||
if (tmp > 0) {
|
if (tmp > 0) {
|
||||||
pos = tmp + 1;
|
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));
|
dbProperties.save(updateable.get(MODIFIED));
|
||||||
LOGGER.info("Begin database maintenance.");
|
LOGGER.info("Begin database maintenance.");
|
||||||
cveDb.cleanupDatabase();
|
cveDb.cleanupDatabase();
|
||||||
LOGGER.info("End database maintenance.");
|
LOGGER.info("End database maintenance.");
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -249,7 +249,8 @@ public final class ExtractionUtil {
|
|||||||
throw new IOException("Unable to rename '" + file.getPath() + "'");
|
throw new IOException("Unable to rename '" + file.getPath() + "'");
|
||||||
}
|
}
|
||||||
final File newFile = new File(originalPath);
|
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)) {
|
FileOutputStream out = new FileOutputStream(newFile)) {
|
||||||
IOUtils.copy(cin, out);
|
IOUtils.copy(cin, out);
|
||||||
} finally {
|
} finally {
|
||||||
|
|||||||
Reference in New Issue
Block a user