From eae979d9b0c0d9a810b5a7d45ae5fd3e435a8e60 Mon Sep 17 00:00:00 2001 From: Jeremy Landis Date: Mon, 15 Jan 2024 17:12:57 -0500 Subject: [PATCH] [cleanup] Reuse already defined object for same in IT sarif-2 test --- src/it/sarif-2/verify.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/it/sarif-2/verify.groovy b/src/it/sarif-2/verify.groovy index 7cc3c61ee..5679c2e13 100644 --- a/src/it/sarif-2/verify.groovy +++ b/src/it/sarif-2/verify.groovy @@ -1,5 +1,5 @@ /* - * Copyright 2005-2023 the original author or authors. + * Copyright 2005-2024 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ def slurpedResult = new JsonSlurper().parse(spotbugSarifFile) def results = slurpedResult.runs.results[0] -for (result in slurpedResult.runs.results[0]) { +for (result in results) { for (loc in result.locations) { String location = normalizePath(loc.physicalLocation.artifactLocation.uri) //Making sure that the path was expanded