checkstyle fixes

Former-commit-id: 213d1375060723f9bded7680cf07ad0f790cd71c
This commit is contained in:
Jeremy Long
2013-05-10 06:03:00 -04:00
parent d180618634
commit 47cc3d7358
3 changed files with 7 additions and 10 deletions

View File

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

View File

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

View File

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