Skip to content

Commit

Permalink
Merge pull request #4382 from nscuro/backport-pr-4326
Browse files Browse the repository at this point in the history
  • Loading branch information
nscuro authored Nov 14, 2024
2 parents 4a0a2b0 + 0864f70 commit 247c4c3
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 57 deletions.
38 changes: 19 additions & 19 deletions src/main/java/org/dependencytrack/model/DependencyMetrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ public void setLow(int low) {
}

public int getUnassigned() {
return unassigned;
return unassigned != null ? unassigned : 0;
}

public void setUnassigned(int unassigned) {
Expand All @@ -265,23 +265,23 @@ public void setSuppressed(int suppressed) {
}

public int getFindingsTotal() {
return findingsTotal;
return findingsTotal != null ? findingsTotal : 0;
}

public void setFindingsTotal(int findingsTotal) {
this.findingsTotal = findingsTotal;
}

public int getFindingsAudited() {
return findingsAudited;
return findingsAudited != null ? findingsAudited : 0;
}

public void setFindingsAudited(int findingsAudited) {
this.findingsAudited = findingsAudited;
}

public int getFindingsUnaudited() {
return findingsUnaudited;
return findingsUnaudited != null ? findingsUnaudited : 0;
}

public void setFindingsUnaudited(int findingsUnaudited) {
Expand All @@ -297,119 +297,119 @@ public void setInheritedRiskScore(double inheritedRiskScore) {
}

public int getPolicyViolationsFail() {
return policyViolationsFail;
return policyViolationsFail != null ? policyViolationsFail : 0;
}

public void setPolicyViolationsFail(int policyViolationsFail) {
this.policyViolationsFail = policyViolationsFail;
}

public int getPolicyViolationsWarn() {
return policyViolationsWarn;
return policyViolationsWarn != null ? policyViolationsWarn : 0;
}

public void setPolicyViolationsWarn(int policyViolationsWarn) {
this.policyViolationsWarn = policyViolationsWarn;
}

public int getPolicyViolationsInfo() {
return policyViolationsInfo;
return policyViolationsInfo != null ? policyViolationsInfo : 0;
}

public void setPolicyViolationsInfo(int policyViolationsInfo) {
this.policyViolationsInfo = policyViolationsInfo;
}

public int getPolicyViolationsTotal() {
return policyViolationsTotal;
return policyViolationsTotal != null ? policyViolationsTotal : 0;
}

public void setPolicyViolationsTotal(int policyViolationsTotal) {
this.policyViolationsTotal = policyViolationsTotal;
}

public int getPolicyViolationsAudited() {
return policyViolationsAudited;
return policyViolationsAudited != null ? policyViolationsAudited : 0;
}

public void setPolicyViolationsAudited(int policyViolationsAudited) {
this.policyViolationsAudited = policyViolationsAudited;
}

public int getPolicyViolationsUnaudited() {
return policyViolationsUnaudited;
return policyViolationsUnaudited != null ? policyViolationsUnaudited : 0;
}

public void setPolicyViolationsUnaudited(int policyViolationsUnaudited) {
this.policyViolationsUnaudited = policyViolationsUnaudited;
}

public int getPolicyViolationsSecurityTotal() {
return policyViolationsSecurityTotal;
return policyViolationsSecurityTotal != null ? policyViolationsSecurityTotal : 0;
}

public void setPolicyViolationsSecurityTotal(int policyViolationsSecurityTotal) {
this.policyViolationsSecurityTotal = policyViolationsSecurityTotal;
}

public int getPolicyViolationsSecurityAudited() {
return policyViolationsSecurityAudited;
return policyViolationsSecurityAudited != null ? policyViolationsSecurityAudited : 0;
}

public void setPolicyViolationsSecurityAudited(int policyViolationsSecurityAudited) {
this.policyViolationsSecurityAudited = policyViolationsSecurityAudited;
}

public int getPolicyViolationsSecurityUnaudited() {
return policyViolationsSecurityUnaudited;
return policyViolationsSecurityUnaudited != null ? policyViolationsSecurityUnaudited : 0;
}

public void setPolicyViolationsSecurityUnaudited(int policyViolationsSecurityUnaudited) {
this.policyViolationsSecurityUnaudited = policyViolationsSecurityUnaudited;
}

public int getPolicyViolationsLicenseTotal() {
return policyViolationsLicenseTotal;
return policyViolationsLicenseTotal != null ? policyViolationsLicenseTotal : 0;
}

public void setPolicyViolationsLicenseTotal(int policyViolationsLicenseTotal) {
this.policyViolationsLicenseTotal = policyViolationsLicenseTotal;
}

public int getPolicyViolationsLicenseAudited() {
return policyViolationsLicenseAudited;
return policyViolationsLicenseAudited != null ? policyViolationsLicenseAudited : 0;
}

public void setPolicyViolationsLicenseAudited(int policyViolationsLicenseAudited) {
this.policyViolationsLicenseAudited = policyViolationsLicenseAudited;
}

public int getPolicyViolationsLicenseUnaudited() {
return policyViolationsLicenseUnaudited;
return policyViolationsLicenseUnaudited != null ? policyViolationsLicenseUnaudited : 0;
}

public void setPolicyViolationsLicenseUnaudited(int policyViolationsLicenseUnaudited) {
this.policyViolationsLicenseUnaudited = policyViolationsLicenseUnaudited;
}

public int getPolicyViolationsOperationalTotal() {
return policyViolationsOperationalTotal;
return policyViolationsOperationalTotal != null ? policyViolationsOperationalTotal : 0;
}

public void setPolicyViolationsOperationalTotal(int policyViolationsOperationalTotal) {
this.policyViolationsOperationalTotal = policyViolationsOperationalTotal;
}

public int getPolicyViolationsOperationalAudited() {
return policyViolationsOperationalAudited;
return policyViolationsOperationalAudited != null ? policyViolationsOperationalAudited : 0;
}

public void setPolicyViolationsOperationalAudited(int policyViolationsOperationalAudited) {
this.policyViolationsOperationalAudited = policyViolationsOperationalAudited;
}

public int getPolicyViolationsOperationalUnaudited() {
return policyViolationsOperationalUnaudited;
return policyViolationsOperationalUnaudited != null ? policyViolationsOperationalUnaudited : 0;
}

public void setPolicyViolationsOperationalUnaudited(int policyViolationsOperationalUnaudited) {
Expand Down
38 changes: 19 additions & 19 deletions src/main/java/org/dependencytrack/model/PortfolioMetrics.java
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public void setLow(int low) {
}

public int getUnassigned() {
return unassigned;
return unassigned != null ? unassigned : 0;
}

public void setUnassigned(int unassigned) {
Expand Down Expand Up @@ -285,23 +285,23 @@ public void setSuppressed(int suppressed) {
}

public int getFindingsTotal() {
return findingsTotal;
return findingsTotal != null ? findingsTotal : 0;
}

public void setFindingsTotal(int findingsTotal) {
this.findingsTotal = findingsTotal;
}

public int getFindingsAudited() {
return findingsAudited;
return findingsAudited != null ? findingsAudited : 0;
}

public void setFindingsAudited(int findingsAudited) {
this.findingsAudited = findingsAudited;
}

public int getFindingsUnaudited() {
return findingsUnaudited;
return findingsUnaudited != null ? findingsUnaudited : 0;
}

public void setFindingsUnaudited(int findingsUnaudited) {
Expand All @@ -317,119 +317,119 @@ public void setInheritedRiskScore(double inheritedRiskScore) {
}

public int getPolicyViolationsFail() {
return policyViolationsFail;
return policyViolationsFail != null ? policyViolationsFail : 0;
}

public void setPolicyViolationsFail(int policyViolationsFail) {
this.policyViolationsFail = policyViolationsFail;
}

public int getPolicyViolationsWarn() {
return policyViolationsWarn;
return policyViolationsWarn != null ? policyViolationsWarn : 0;
}

public void setPolicyViolationsWarn(int policyViolationsWarn) {
this.policyViolationsWarn = policyViolationsWarn;
}

public int getPolicyViolationsInfo() {
return policyViolationsInfo;
return policyViolationsInfo != null ? policyViolationsInfo : 0;
}

public void setPolicyViolationsInfo(int policyViolationsInfo) {
this.policyViolationsInfo = policyViolationsInfo;
}

public int getPolicyViolationsTotal() {
return policyViolationsTotal;
return policyViolationsTotal != null ? policyViolationsTotal : 0;
}

public void setPolicyViolationsTotal(int policyViolationsTotal) {
this.policyViolationsTotal = policyViolationsTotal;
}

public int getPolicyViolationsAudited() {
return policyViolationsAudited;
return policyViolationsAudited != null ? policyViolationsAudited : 0;
}

public void setPolicyViolationsAudited(int policyViolationsAudited) {
this.policyViolationsAudited = policyViolationsAudited;
}

public int getPolicyViolationsUnaudited() {
return policyViolationsUnaudited;
return policyViolationsUnaudited != null ? policyViolationsUnaudited : 0;
}

public void setPolicyViolationsUnaudited(int policyViolationsUnaudited) {
this.policyViolationsUnaudited = policyViolationsUnaudited;
}

public int getPolicyViolationsSecurityTotal() {
return policyViolationsSecurityTotal;
return policyViolationsSecurityTotal != null ? policyViolationsSecurityTotal : 0;
}

public void setPolicyViolationsSecurityTotal(int policyViolationsSecurityTotal) {
this.policyViolationsSecurityTotal = policyViolationsSecurityTotal;
}

public int getPolicyViolationsSecurityAudited() {
return policyViolationsSecurityAudited;
return policyViolationsSecurityAudited != null ? policyViolationsSecurityAudited : 0;
}

public void setPolicyViolationsSecurityAudited(int policyViolationsSecurityAudited) {
this.policyViolationsSecurityAudited = policyViolationsSecurityAudited;
}

public int getPolicyViolationsSecurityUnaudited() {
return policyViolationsSecurityUnaudited;
return policyViolationsSecurityUnaudited != null ? policyViolationsSecurityUnaudited : 0;
}

public void setPolicyViolationsSecurityUnaudited(int policyViolationsSecurityUnaudited) {
this.policyViolationsSecurityUnaudited = policyViolationsSecurityUnaudited;
}

public int getPolicyViolationsLicenseTotal() {
return policyViolationsLicenseTotal;
return policyViolationsLicenseTotal != null ? policyViolationsLicenseTotal : 0;
}

public void setPolicyViolationsLicenseTotal(int policyViolationsLicenseTotal) {
this.policyViolationsLicenseTotal = policyViolationsLicenseTotal;
}

public int getPolicyViolationsLicenseAudited() {
return policyViolationsLicenseAudited;
return policyViolationsLicenseAudited != null ? policyViolationsLicenseAudited : 0;
}

public void setPolicyViolationsLicenseAudited(int policyViolationsLicenseAudited) {
this.policyViolationsLicenseAudited = policyViolationsLicenseAudited;
}

public int getPolicyViolationsLicenseUnaudited() {
return policyViolationsLicenseUnaudited;
return policyViolationsLicenseUnaudited != null ? policyViolationsLicenseUnaudited : 0;
}

public void setPolicyViolationsLicenseUnaudited(int policyViolationsLicenseUnaudited) {
this.policyViolationsLicenseUnaudited = policyViolationsLicenseUnaudited;
}

public int getPolicyViolationsOperationalTotal() {
return policyViolationsOperationalTotal;
return policyViolationsOperationalTotal != null ? policyViolationsOperationalTotal : 0;
}

public void setPolicyViolationsOperationalTotal(int policyViolationsOperationalTotal) {
this.policyViolationsOperationalTotal = policyViolationsOperationalTotal;
}

public int getPolicyViolationsOperationalAudited() {
return policyViolationsOperationalAudited;
return policyViolationsOperationalAudited != null ? policyViolationsOperationalAudited : 0;
}

public void setPolicyViolationsOperationalAudited(int policyViolationsOperationalAudited) {
this.policyViolationsOperationalAudited = policyViolationsOperationalAudited;
}

public int getPolicyViolationsOperationalUnaudited() {
return policyViolationsOperationalUnaudited;
return policyViolationsOperationalUnaudited != null ? policyViolationsOperationalUnaudited : 0;
}

public void setPolicyViolationsOperationalUnaudited(int policyViolationsOperationalUnaudited) {
Expand Down
Loading

0 comments on commit 247c4c3

Please sign in to comment.