Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
lgtm error fix test 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Murugan, Aravindhan committed Oct 29, 2020
1 parent 65927f7 commit e94f27e
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,16 @@ public ResponseEntity<String> refresh(@Valid String projectName, @Valid String p
this.collector = collectorRepository.findByName("Sonar");

SonarProject projectToRefresh;
String resMsg;
if (Objects.nonNull(this.collector)) {
if ((Objects.nonNull(projectName) && Objects.nonNull(projectToRefresh = getExistingProject()))
|| (Objects.nonNull(projectKey) && Objects.nonNull(projectToRefresh = createNewProjectIfNotExists()))) {
SonarCollectorUtil.updateCodeQualityData(this.collector, this.sonarClient, projectToRefresh);
return response("\"successfully refreshed sonar project\"");
resMsg = "successfully refreshed sonar project";
return response(String.format("%s", resMsg));
}
return response("unable to refresh sonar project");
resMsg = "unable to refresh sonar project";
return response(resMsg);
}
return response("sonar collector not found");
}
Expand Down

0 comments on commit e94f27e

Please sign in to comment.