lgtm suggested changes

This commit is contained in:
Jeremy Long
2017-09-07 05:46:21 -04:00
parent c31a56228b
commit 417fda8c7c
3 changed files with 9 additions and 5 deletions

View File

@@ -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;

View File

@@ -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.");
}
//}
}
/**

View File

@@ -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 {