From 6badd51b6972d7c5d71ac77c2991ce3dbf386606 Mon Sep 17 00:00:00 2001 From: Jeremy Long Date: Sat, 25 Jan 2014 11:06:45 -0500 Subject: [PATCH] changed nested ifs to avoid checkstyle complaint Former-commit-id: 9dbe97cb0d0899dd2920dacdfda82778455a0d89 --- .../dependency/VulnerableSoftware.java | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/VulnerableSoftware.java b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/VulnerableSoftware.java index d38591642..9fd5bacea 100644 --- a/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/VulnerableSoftware.java +++ b/dependency-check-core/src/main/java/org/owasp/dependencycheck/dependency/VulnerableSoftware.java @@ -73,19 +73,19 @@ public class VulnerableSoftware extends IndexEntry implements Serializable, Comp if (cpeName != null && cpeName.length() > 7) { final String[] data = cpeName.substring(7).split(":"); if (data.length >= 1) { - this.setVendor(URLDecoder.decode(data[0].replace("+", "%2B"), "UTF-8")); //.replaceAll("[_-]", " ") - if (data.length >= 2) { - this.setProduct(URLDecoder.decode(data[1].replace("+", "%2B"), "UTF-8")); //.replaceAll("[_-]", " ") - if (data.length >= 3) { - version = URLDecoder.decode(data[2].replace("+", "%2B"), "UTF-8"); - if (data.length >= 4) { - revision = URLDecoder.decode(data[3].replace("+", "%2B"), "UTF-8"); - if (data.length >= 5) { - edition = URLDecoder.decode(data[4].replace("+", "%2B"), "UTF-8"); - } - } - } - } + this.setVendor(URLDecoder.decode(data[0].replace("+", "%2B"), "UTF-8")); + } + if (data.length >= 2) { + this.setProduct(URLDecoder.decode(data[1].replace("+", "%2B"), "UTF-8")); + } + if (data.length >= 3) { + version = URLDecoder.decode(data[2].replace("+", "%2B"), "UTF-8"); + } + if (data.length >= 4) { + revision = URLDecoder.decode(data[3].replace("+", "%2B"), "UTF-8"); + } + if (data.length >= 5) { + edition = URLDecoder.decode(data[4].replace("+", "%2B"), "UTF-8"); } } }