From a61d5ddd5c433a082897baac5c2920568d604de9 Mon Sep 17 00:00:00 2001 From: dtbaum Date: Fri, 28 Jul 2023 07:04:20 +0200 Subject: [PATCH] fixed PMD warning --- src/main/java/edu/hm/hafner/analysis/parser/GrypeParser.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/edu/hm/hafner/analysis/parser/GrypeParser.java b/src/main/java/edu/hm/hafner/analysis/parser/GrypeParser.java index 543cd1796..125957701 100644 --- a/src/main/java/edu/hm/hafner/analysis/parser/GrypeParser.java +++ b/src/main/java/edu/hm/hafner/analysis/parser/GrypeParser.java @@ -45,7 +45,7 @@ private Issue getIssue(final IssueBuilder issueBuilder, final JSONObject match) String fileName = match.getJSONObject(ARTIFACT_TAG).getJSONArray(LOCATIONS_TAG).getJSONObject(0) .getString(PATH_TAG); - Issue issue = issueBuilder.setFileName(fileName) + return issueBuilder.setFileName(fileName) .setCategory(vuln.getString(SEVERITY_TAG)) .setSeverity(Severity.guessFromString(vuln.getString(SEVERITY_TAG))) .setType(vuln.getString(ID_TAG)) @@ -56,6 +56,5 @@ private Issue getIssue(final IssueBuilder issueBuilder, final JSONObject match) .withHref(vuln.getString(DATA_SOURCE_TAG)) .withText(vuln.getString(DATA_SOURCE_TAG))).render()) .build(); - return issue; } }