Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
Merge pull request #68 from nireeshT/master
Browse files Browse the repository at this point in the history
Sonar projectId null check
  • Loading branch information
rvema authored Oct 1, 2020
2 parents 6cdb3f1 + 8069593 commit f802dfe
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<description>CodeQuality Collector Microservices currently collects data from Sonar</description>
<url>https://hygieia.github.io/Hygieia/getting_started.html</url>
<packaging>jar</packaging>
<version>3.2.1-SNAPSHOT</version>
<version>3.2.2-SNAPSHOT</version>

<parent>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,10 @@ private void addNewProjects(List<SonarProject> projects, List<SonarProject> exis
int[] indexes = IntStream.range(0,existingProjects.size()).filter(i-> existingProjects.get(i).equals(project)).toArray();
for (int index :indexes) {
SonarProject s = existingProjects.get(index);
if (!s.getProjectId().equals(project.getProjectId()) || !StringUtils.equals(s.getNiceName(),project.getNiceName())) {
if(Objects.isNull(s.getProjectId())){
LOG.info("ProjectId is null for sonar project="+s.getProjectName());
}
if ((Objects.nonNull(s.getProjectId()) && !s.getProjectId().equals(project.getProjectId())) || !StringUtils.equals(s.getNiceName(),project.getNiceName())) {
LOG.info(String.format("UpdatedProject projectName=%s projectId=%s enabled=%s",
project.getProjectName(), s.getProjectId(), Boolean.toString(s.isEnabled())));
if (s.getErrors().size() > 0) {
Expand Down

0 comments on commit f802dfe

Please sign in to comment.