mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-20 16:24:11 +01:00
minor bug fix
Former-commit-id: 0f0d101a22e904db91348dd40a40780d9bcb85ad
This commit is contained in:
@@ -265,7 +265,7 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
} catch (IOException ex) {
|
} catch (IOException ex) {
|
||||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.SEVERE, null, ex);
|
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.SEVERE, null, ex);
|
||||||
}
|
}
|
||||||
foundSomething |= setPomEvidence(dependency, pom, pomProperties);
|
foundSomething = setPomEvidence(dependency, pom, pomProperties) || foundSomething;
|
||||||
}
|
}
|
||||||
return foundSomething;
|
return foundSomething;
|
||||||
}
|
}
|
||||||
@@ -299,13 +299,13 @@ public class JarAnalyzer extends AbstractAnalyzer implements Analyzer {
|
|||||||
*/
|
*/
|
||||||
private List<String> retrievePomListing(final JarFile jar) throws IOException {
|
private List<String> retrievePomListing(final JarFile jar) throws IOException {
|
||||||
final List<String> pomEntries = new ArrayList<String>();
|
final List<String> pomEntries = new ArrayList<String>();
|
||||||
JarEntry entry = jar.entries().nextElement();
|
final Enumeration<JarEntry> entries = jar.entries();
|
||||||
while (entry != null) {
|
while (entries.hasMoreElements()) {
|
||||||
|
JarEntry entry = entries.nextElement();
|
||||||
final String entryName = (new File(entry.getName())).getName().toLowerCase();
|
final String entryName = (new File(entry.getName())).getName().toLowerCase();
|
||||||
if (!entry.isDirectory() && "pom.xml".equals(entryName)) {
|
if (!entry.isDirectory() && "pom.xml".equals(entryName)) {
|
||||||
pomEntries.add(entry.getName());
|
pomEntries.add(entry.getName());
|
||||||
}
|
}
|
||||||
entry = jar.entries().nextElement();
|
|
||||||
}
|
}
|
||||||
return pomEntries;
|
return pomEntries;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user