mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-03-22 00:59:34 +01:00
Replace with foreach
This commit is contained in:
@@ -380,18 +380,16 @@ public class FalsePositiveAnalyzer extends AbstractAnalyzer {
|
|||||||
*/
|
*/
|
||||||
private void addFalseNegativeCPEs(Dependency dependency) {
|
private void addFalseNegativeCPEs(Dependency dependency) {
|
||||||
//TODO move this to the hint analyzer
|
//TODO move this to the hint analyzer
|
||||||
final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
|
for (final Identifier identifier : dependency.getIdentifiers()) {
|
||||||
while (itr.hasNext()) {
|
if ("cpe".equals(identifier.getType()) && identifier.getValue() != null
|
||||||
final Identifier i = itr.next();
|
&& (identifier.getValue().startsWith("cpe:/a:oracle:opensso:")
|
||||||
if ("cpe".equals(i.getType()) && i.getValue() != null
|
|| identifier.getValue().startsWith("cpe:/a:oracle:opensso_enterprise:")
|
||||||
&& (i.getValue().startsWith("cpe:/a:oracle:opensso:")
|
|| identifier.getValue().startsWith("cpe:/a:sun:opensso_enterprise:")
|
||||||
|| i.getValue().startsWith("cpe:/a:oracle:opensso_enterprise:")
|
|| identifier.getValue().startsWith("cpe:/a:sun:opensso:"))) {
|
||||||
|| i.getValue().startsWith("cpe:/a:sun:opensso_enterprise:")
|
final String newCpe = String.format("cpe:/a:sun:opensso_enterprise:%s", identifier.getValue().substring(22));
|
||||||
|| i.getValue().startsWith("cpe:/a:sun:opensso:"))) {
|
final String newCpe2 = String.format("cpe:/a:oracle:opensso_enterprise:%s", identifier.getValue().substring(22));
|
||||||
final String newCpe = String.format("cpe:/a:sun:opensso_enterprise:%s", i.getValue().substring(22));
|
final String newCpe3 = String.format("cpe:/a:sun:opensso:%s", identifier.getValue().substring(22));
|
||||||
final String newCpe2 = String.format("cpe:/a:oracle:opensso_enterprise:%s", i.getValue().substring(22));
|
final String newCpe4 = String.format("cpe:/a:oracle:opensso:%s", identifier.getValue().substring(22));
|
||||||
final String newCpe3 = String.format("cpe:/a:sun:opensso:%s", i.getValue().substring(22));
|
|
||||||
final String newCpe4 = String.format("cpe:/a:oracle:opensso:%s", i.getValue().substring(22));
|
|
||||||
try {
|
try {
|
||||||
dependency.addIdentifier("cpe",
|
dependency.addIdentifier("cpe",
|
||||||
newCpe,
|
newCpe,
|
||||||
|
|||||||
Reference in New Issue
Block a user