Skip to content

Commit 6ef538d

Browse files
authored
Fix getLatestBuildNumber wrong condition (#740)
1 parent e2e800f commit 6ef538d

File tree

1 file changed

+3
-2
lines changed
  • build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory

1 file changed

+3
-2
lines changed

Diff for: build-info-extractor/src/main/java/org/jfrog/build/extractor/clientConfiguration/client/artifactory/ArtifactoryManager.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -283,8 +283,9 @@ public void createRepository(String repository, String repositoryJsonConfig) thr
283283
}
284284

285285
public String getLatestBuildNumber(String buildName, String latestType, String project) throws IOException {
286-
if (!LATEST.equals(latestType.trim()) && LAST_RELEASE.equals(latestType.trim())) {
287-
log.warn("GetLatestBuildNumber accepts only two latest types: LATEST or LAST_RELEASE");
286+
String trimmedLatestType = latestType.trim();
287+
if (!LATEST.equals(trimmedLatestType) && !LAST_RELEASE.equals(trimmedLatestType)) {
288+
log.warn("GetLatestBuildNumber accepts only two latest types: LATEST or LAST_RELEASE. Got: "+ trimmedLatestType);
288289
return null;
289290
}
290291
Version versionService = new Version(log);

0 commit comments

Comments
 (0)