mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 08:13:43 +01:00
checkstyle fixes
Former-commit-id: 6074262a482d3136e7a2b9e12c2b5448dd4d1426
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/*
|
||||
** This file is part of Dependency-Check.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
** Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
|
||||
@@ -161,19 +161,19 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
|
||||
* @return a string representing the base path.
|
||||
*/
|
||||
private String getBaseRepoPath(final String path) {
|
||||
int pos = path.indexOf("repository") + 10;
|
||||
if (pos<0) {
|
||||
int pos = path.indexOf("repository" + File.separator) + 11;
|
||||
if (pos < 0) {
|
||||
return path;
|
||||
}
|
||||
int tmp = path.indexOf(File.separator, pos);
|
||||
if (tmp<=0) {
|
||||
if (tmp <= 0) {
|
||||
return path;
|
||||
}
|
||||
if (tmp>0) {
|
||||
if (tmp > 0) {
|
||||
pos = tmp + 1;
|
||||
}
|
||||
tmp = path.indexOf(File.separator, pos);
|
||||
if (tmp>0) {
|
||||
if (tmp > 0) {
|
||||
pos = tmp + 1;
|
||||
}
|
||||
return path.substring(0, pos);
|
||||
|
||||
@@ -376,9 +376,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
||||
JarFile jar = null;
|
||||
try {
|
||||
jar = new JarFile(dependency.getActualFilePath());
|
||||
|
||||
final java.util.Enumeration en = jar.entries();
|
||||
|
||||
final HashMap<String, Integer> level0 = new HashMap<String, Integer>();
|
||||
final HashMap<String, Integer> level1 = new HashMap<String, Integer>();
|
||||
final HashMap<String, Integer> level2 = new HashMap<String, Integer>();
|
||||
@@ -438,7 +436,6 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
||||
}
|
||||
final EvidenceCollection vendor = dependency.getVendorEvidence();
|
||||
final EvidenceCollection product = dependency.getProductEvidence();
|
||||
|
||||
for (String s : level0.keySet()) {
|
||||
if (!"org".equals(s) && !"com".equals(s)) {
|
||||
vendor.addWeighting(s);
|
||||
|
||||
Reference in New Issue
Block a user