mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-28 20:02:16 +01:00
checkstyle correction - reduced method length
This commit is contained in:
@@ -652,7 +652,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
jar = new JarFile(dependency.getActualFilePath());
|
jar = new JarFile(dependency.getActualFilePath());
|
||||||
final Manifest manifest = jar.getManifest();
|
final Manifest manifest = jar.getManifest();
|
||||||
if (manifest == null) {
|
if (manifest == null) {
|
||||||
//don't log this for javadoc or sources jar files
|
|
||||||
if (!dependency.getFileName().toLowerCase().endsWith("-sources.jar")
|
if (!dependency.getFileName().toLowerCase().endsWith("-sources.jar")
|
||||||
&& !dependency.getFileName().toLowerCase().endsWith("-javadoc.jar")
|
&& !dependency.getFileName().toLowerCase().endsWith("-javadoc.jar")
|
||||||
&& !dependency.getFileName().toLowerCase().endsWith("-src.jar")
|
&& !dependency.getFileName().toLowerCase().endsWith("-src.jar")
|
||||||
@@ -669,7 +668,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
String source = "Manifest";
|
String source = "Manifest";
|
||||||
String specificationVersion = null;
|
String specificationVersion = null;
|
||||||
boolean hasImplementationVersion = false;
|
boolean hasImplementationVersion = false;
|
||||||
|
|
||||||
Attributes atts = manifest.getMainAttributes();
|
Attributes atts = manifest.getMainAttributes();
|
||||||
for (Entry<Object, Object> entry : atts.entrySet()) {
|
for (Entry<Object, Object> entry : atts.entrySet()) {
|
||||||
String key = entry.getKey().toString();
|
String key = entry.getKey().toString();
|
||||||
@@ -700,7 +698,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
} else if (key.equalsIgnoreCase(BUNDLE_DESCRIPTION)) {
|
} else if (key.equalsIgnoreCase(BUNDLE_DESCRIPTION)) {
|
||||||
foundSomething = true;
|
foundSomething = true;
|
||||||
addDescription(dependency, value, "manifest", key);
|
addDescription(dependency, value, "manifest", key);
|
||||||
//productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
|
|
||||||
addMatchingValues(classInformation, value, productEvidence);
|
addMatchingValues(classInformation, value, productEvidence);
|
||||||
} else if (key.equalsIgnoreCase(BUNDLE_NAME)) {
|
} else if (key.equalsIgnoreCase(BUNDLE_NAME)) {
|
||||||
foundSomething = true;
|
foundSomething = true;
|
||||||
@@ -719,11 +716,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
//skipping main class as if this has important information to add
|
//skipping main class as if this has important information to add
|
||||||
// it will be added during class name analysis... if other fields
|
// it will be added during class name analysis... if other fields
|
||||||
// have the information from the class name then they will get added...
|
// have the information from the class name then they will get added...
|
||||||
// foundSomething = true;
|
|
||||||
// productEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
|
|
||||||
// vendorEvidence.addEvidence(source, key, value, Confidence.MEDIUM);
|
|
||||||
// addMatchingValues(classInformation, value, vendorEvidence);
|
|
||||||
// addMatchingValues(classInformation, value, productEvidence);
|
|
||||||
} else {
|
} else {
|
||||||
key = key.toLowerCase();
|
key = key.toLowerCase();
|
||||||
if (!IGNORE_KEYS.contains(key)
|
if (!IGNORE_KEYS.contains(key)
|
||||||
@@ -737,7 +729,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
|
|||||||
&& !value.trim().startsWith("scm:")
|
&& !value.trim().startsWith("scm:")
|
||||||
&& !isImportPackage(key, value)
|
&& !isImportPackage(key, value)
|
||||||
&& !isPackage(key, value)) {
|
&& !isPackage(key, value)) {
|
||||||
|
|
||||||
foundSomething = true;
|
foundSomething = true;
|
||||||
if (key.contains("version")) {
|
if (key.contains("version")) {
|
||||||
if (!key.contains("specification")) {
|
if (!key.contains("specification")) {
|
||||||
|
|||||||
Reference in New Issue
Block a user