Improve parameter name of the JenkinsCiPluginRepository The findArtifact() method has now a better parameter name for finding all the artifacts that have a specific suffix. Change-Id: I1296a8101d483afb3a07b2558357200683c03e41 (cherry picked from commit 4f185f2096e5e4a03553fed91333fe3d582ebcad)
diff --git a/src/main/java/com/googlesource/gerrit/plugins/manager/repository/JenkinsCiPluginsRepository.java b/src/main/java/com/googlesource/gerrit/plugins/manager/repository/JenkinsCiPluginsRepository.java index 48dac31..dc124f4 100644 --- a/src/main/java/com/googlesource/gerrit/plugins/manager/repository/JenkinsCiPluginsRepository.java +++ b/src/main/java/com/googlesource/gerrit/plugins/manager/repository/JenkinsCiPluginsRepository.java
@@ -303,11 +303,11 @@ return pluginPathParts[pluginPathParts.length - 2].equals("target"); } - private Optional<SmartJson> findArtifact(JsonArray artifacts, String string) { + private Optional<SmartJson> findArtifact(JsonArray artifacts, String artifactSuffix) { for (int i = 0; i < artifacts.size(); i++) { SmartJson artifact = SmartJson.of(artifacts.get(i)); String path = artifact.getString("relativePath"); - if (path.endsWith(string) && !path.endsWith("-static" + string)) { + if (path.endsWith(artifactSuffix) && !path.endsWith("-static" + artifactSuffix)) { return Optional.of(artifact); } }